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

Fix range-loop-analysis warning

parent af7d77b6
......@@ -137,9 +137,11 @@ public:
&& !has_to_string<T>::value>
consume(T& xs) {
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();
consume(deconst(x));
consume(deconst(*i));
}
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