remove_if does not work with call
jonathanpoelen opened this issue · 9 comments
we are kind of patching in circles here, this is fixed in the lcall branch as well. In my mind we need to make a decision on lcall first, and merge it, before really getting stuff streamlined. call has also been renamed to bind
in the mean time as well.
I feel that the only resistance to merge reside in incomplete tests.
However, the semantics of actuel call
is different from bind
.
transform<list<int>, list<int>, CALL_OR_BIND<pair>>{} = list<pair<int,int>>{};
call: ok
bind: error with apply
@porkybrain code isn't wine, it will not become better because it waits to be merged somewhere. :-) Appart from more tests, what do you feel is missing?
@jonathanpoelen yes bind and call are different, we could support both but I think making the user write one _1
(as is the case with bind) is probably better than having two things that do essentially the same thing. Plus the less things we have the more we can fast track.
@edouarda it is really is only about testing at this point. I can't really think of anything else that the lambdas should be able to do and I don't see any potential to make them faster. I actually ported some code to use the new lambdas (mostly just adding pin
here and there) in order to get a sense for real speed up, everything still works and it is considerably faster.
looking at my pull request again it looks like the only tests which I threw out were things like unpack
quote
protect
and is_placeholder
which were really just internal implementation details which are no longer needed. Keep in mind the new lambdas a far far less complex than the old ones.
I'm not really sure what kind of additional tests are needed, any suggestions?
mmm... You are right. I think what could be cool is to have an example but we can merge before.
ok sure, I'll do like a carteasian product and maybe some of the old boost.MPL examples so that people have an easy transition. Should have more time on the weekend.
Awesome that will help me write some tutorials.
this has been fixed, I added a unit test to make sure I don't break it again. #192