-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove_if seems not to work as expected #219
Comments
Why not erase the item from the set directly? Are you sure your lambda doesn't always return false? |
Thanks for your quick reply. I do not use erase, because I actually want to remove all entries, which are contained in one set, from another set. I only condensed this to the above example to make it small and easily understandable. Regarding the lambda I tried the following: Just a note: I'm really astonished what you created with the Brigand library. I used Boost::mpl a lot, but Brigand is so small and elegant! |
A very late reply, but your problem is that
|
When trying to remove items from a set via remove_if, this does not generate the expected result:
struct A {};
struct B {};
struct C {};
using Result = brigand::remove_if<brigand::set<A, B, C>, brigand::has_key<brigand::set<A>, brigand::_1>>;
From my understanding Result should not contain A in this case, but for some reason it does. I tried this with GCC 4.9, 5.4 and 6.2. Is this a bug or do I expect something wrong? I tried this with Brigard 1.3.0
The text was updated successfully, but these errors were encountered: