Closed tower120 closed 5 years ago
No reason, short of a lack of time. Can I interest you in submitting a PR?
Can I interest you in submitting a PR?
I'll make PR with action::remove
/action::unstable_remove
/view::remove
, as soon as we dealt with unstable_remove_if
.
Leaving this issue opened, to link with future PR.
I'm trying to implement action::remove
as wrapper around action::remove_if
.
I think, I bumped into the same thing as with views. Does actions must be Semiregular too?
Following wan't compile: https://wandbox.org/permlink/2cqBMYc1lTAoJ5w2
#include <iostream>
#include <vector>
#include <range/v3/action/remove_if.hpp>
struct Pred{
int i = 2;
Pred(const Pred&) = delete;
Pred(Pred&&) = default;
Pred() = default;
bool operator()(int other) const {
return other == i;
}
};
void test_value_capture(){
using List = std::vector<int>;
List list{};
list |= ranges::action::remove_if(Pred());
std::cout << list.empty();
}
int main()
{
test_value_capture();
}
Is there a particular reason, why there is no
action::remove
/view::remove
?