make readBrackets advance iterator again

This commit is contained in:
Julian Daube 2017-10-08 19:18:41 +02:00
parent a9c5d05ea8
commit 1650570b0a

View File

@ -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 &current, 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();
}