-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Labels
Description
Hi
I'm getting another strange behaviour:
vector<bool> v{true, true, false, false,false, true, true};
for (auto &&x: iter::groupby(v,[](auto b){return b;})) {
cout << "group: ";
for (auto &&g: x.second)
cout << g << " ";
cout << endl;
}
prints
group: 1 1 0 0 0 1 1
yet
vector<int> v{5,5,5,3,3};
for (auto &&x: iter::groupby(v,[](auto b){return b;})) {
cout << "group: ";
for (auto &&g: x.second)
cout << g << " ";
cout << endl;
}
prints
group: 5 5 5
group: 3 3
Is there a reason why it shouldn't work with bool ?