-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!rangesC++20/23 rangesC++20/23 ranges
Description
Lines 6258 to 6260 in ef62d3f
| const auto _Not_pred = [&_Orig_pred = *_Pred]<class _Ty1, class _Ty2>(_Ty1&& _Left, _Ty2&& _Right) { | |
| return !_STD invoke(_Orig_pred, _STD forward<_Ty1>(_Left), _STD forward<_Ty2>(_Right)); | |
| }; |
Lines 6272 to 6274 in ef62d3f
| const auto _Rev_not_pred = [&_Orig_pred = *_Pred]<class _Ty1, class _Ty2>(_Ty1&& _Left, _Ty2&& _Right) { | |
| return !_STD invoke(_Orig_pred, _STD forward<_Ty2>(_Right), _STD forward<_Ty1>(_Left)); | |
| }; |
This is basically the same problem as #2888.
I don't know how to use MSVC-STL-trunk with Compiler Explorer, but the following code should be rejected incorrectly.
#include <ranges>
struct Bool {
Bool& operator!();
Bool() = default;
Bool(const Bool&) = delete;
operator bool() { return true; };
};
int main() {
Bool b;
int x[] = {42};
auto r = std::views::iota(0, 5) | std::views::chunk_by([&](auto, auto) -> Bool& { return b; });
r.begin();
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!rangesC++20/23 rangesC++20/23 ranges