Commit 80fd383e authored by Dominik Charousset's avatar Dominik Charousset

Fix range-loop-analysis warning

parent af7d77b6
...@@ -137,9 +137,11 @@ public: ...@@ -137,9 +137,11 @@ public:
&& !has_to_string<T>::value> && !has_to_string<T>::value>
consume(T& xs) { consume(T& xs) {
result_ += '['; result_ += '[';
for (auto&& x : xs) { // use a hand-written for loop instead of for-each to avoid
// range-loop-analysis warnings when using this function with vector<bool>
for (auto i = xs.begin(); i != xs.end(); ++i) {
sep(); sep();
consume(deconst(x)); consume(deconst(*i));
} }
result_ += ']'; result_ += ']';
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment