<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJylk8Fu3CAQhp_GvqBYGNb2-uBDsmlOOfSQ-wrw2KZlwQK8yfbpO5BNGlXJoapk4TEwM9_8M5ZuvAzfAX5qOxMRSVyAjDBpq6N2lrgp76gtRHfSv0TeXJ22kTj5A1Qs-G1B7wt6XZcY15D22AM-s47LJivlTvhhzPntdbN6l53ZgzRO4ot3e9aynapZKxVVctrXU8OaGiZGW6WmlisF3cRSAC3Vywsa2iqzjYDW8eiFnSGgKfBeCNVSMP5Yt_Tmse72HwFTNZP2AfnP4I0TI3lGSrIKL04QwZOipcentWAtGkQJ1MCaC2oybgqIOQuzAfEwgQeLG_GyprwHIuyYpMIT5-HVJ7GsMbw5CT9vJ7AxVOQJKQIohz7vGIsIRBD0fhZ-TN34k-QzuMyXEsstEh0IBgvRC23hWhEe63D0OffxPdbxXPBDCsG_4YWKPDj_RdYU-5ruKoQFZH1TAr_9Z2Ikt-BQCmT6u0QPqetYpjEf1PjYnnsdo0s4KXWIYxolfnvtbrYV2DGRv94vx4GPPe9FKba4OD8cRIDLQXgUq9y8Gf55IHUIW56khvUNL5eB033X9NPUT6LlnezaWtJ-z0DS3Y43vC6NkGDCUDR3BWNym3HN2jGWRrVgd_lhRXNf_j-PHhhljNaU0a7Z8V3VCeSSbd2rqa6paoodhZPQpkpxKufn0g85JJIFPDQ6oObvhyIEPVuAjI-EUUcDw-fKS5i1zYP-ZWeuLc4dts7eYKfyYKYR8n_9BmUubch1_QbAZHo5>52953</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
std::ranges::cbegin and std::ranges::cend reject all non-`const` rvalue arguments
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug,
libc++
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
CaseyCarter
</td>
</tr>
</table>
<pre>
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`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU8Fu4yAQ_Rr7gmLZENvJwYc22Zx62EPvEeCxzS4BC3Da7NfvQJNsVLWHlRAeBmbemzdjYftL9xPgtzIj4YGECUgPgzIqKGuIHZJHLj7Yk_rDk3O2ygRixS-QIWNPWbnPyus-hTD76KMHXKMK0yIKaU940Pp8-6xmZ1MwPQhtBX5Yu6ENXcuKNkKWUgybaqhpXcFAy0bKoWFSQjvQmEAJ-f6OhjJSLz2gdTw6bkbwaHJ8530xZZS9VE25eqnazSPBWM2gnEf-Z3Da8p68IUsyc8dPEMCRrCmPr3NGGzSI5KiB0RfUpF8kEH3megHiYAAHBh3hMkfcHeGmj1LhjXXwERO5zMHfgrgblxOY4Avyiiw8SIsxdxoT94QTjH7jro_d-AfyFbnELwKLJRDlCSbzwXFl4FoRXit_dAn7eM91PGdsF1OwH_igIAfrvkGNua9wVyEMINebEnh2X4kRw7xFKZDT5xIdxK5jmVo_qPHYnr0KwUY6EdqHPo4Se7p2N9kSTB-Zf7zP-471W7bleVBBQ_d1iIBRmdShb1NeuSVqxpoVQiRFY-3uU__yxenuvyddeb-kEa3ptmb51LWbSm76NZPrrcAxl221ZQ0HYE1FQYDINRegfZfVzxmlYhlxT02hNP4DGX1Oi2b1PlcdLSktq5KWbb1m66LlA29EU23lUFWlrLN1CSeudBFZFdaNuesSQczr8VIrj624X3Lv1WgAEjjm50uYrOt23MNlxx2OYp7q6VIxfwEk4mWo">