make readBrackets advance iterator again
This commit is contained in:
parent
a9c5d05ea8
commit
1650570b0a
7
main.cpp
7
main.cpp
@ -59,10 +59,11 @@ std::string readTill(iterator &start, const iterator &end, std::function<bool(co
|
||||
|
||||
|
||||
template <typename iterator>
|
||||
std::string readBrackets(iterator &begin, const iterator &end, const char * brackets) {
|
||||
auto current = begin;
|
||||
std::string readBrackets(iterator ¤t, const iterator &end, const char * brackets) {
|
||||
// auto current = begin;
|
||||
|
||||
if (begin == end || *current != brackets[0]) {
|
||||
if (current == end || *current != brackets[0]) {
|
||||
std::cout << brackets[0] << "!=" << *current;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user