| Issue |
52953
|
| Summary |
std::ranges::cbegin and std::ranges::cend reject all non-`const` rvalue arguments
|
| Labels |
bug,
libc++
|
| Assignees |
|
| Reporter |
CaseyCarter
|
Peeking at the definition of the customization point object:
https://github.com/llvm/llvm-project/blob/3782624c126bc0cbf81f5251ef206ccf63cce7f2/libcxx/include/__ranges/access.h#L160-L178
the first overload with parameter `_Tp&` can only deduce lvalue reference types, and therefore only accepts lvalue arguments. The second overload has a forwarding reference parameter `_Tp&&`, but is constrained with `is_rvalue_reference_v<_Tp>`. For a forwarding reference, `_Tp` can never deduce an rvalue reference type, so this second overload rejects all arguments.
Ditto for `std::ranges::cend`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs