<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJy9VF1v2yAU_TX4BdVycJzED35ok1Taw6RJ6_uE4dpmwyYDnDb_fhfspGm7VZUqTcKYy4Vz7ie1kafqG1hKijvLhxZSLgQ4l4oaWjWQYkfY_SJlhG1pYyzlA7VHrkeg3LZjD4OnZJXt8aOmof50gCA_4Bdu4M95SfJbHBHdTesZnG32hJXhrnIUng4WiZUZbuD3qJAkgHvzT5AzhvPcK_FDcOdJvhVmcJ4-ELYKI9-fSSJPSr8M1HfIdrCmtbwPSNmOZLfB4DgEYXdhTLssV4PQo0Sv8u2ZfP835eiVVv70rI2z83YUnt4FU79CX4dAr2dwShU6-ETyixxtD3GYVlFP2MVR9GFWIAa14Ec7oH4VIHBrNxPj4gw5zQGm5xeIKwMmtGvrbNBeIVAk2ByNkuHm-7m8aHtzBJTtHPZgHLvHQb93ZtSSgrWxkiSVBhwdjP8o1yepngP0MucXcT_X4nXJXVNMVR3g5iKfD7-J43yyHv3HewCXofcOHmIAVIzMf2mLQG3hJ4iJGrvEUwfQO-wVjmRdbOrZYDwuuNb0UfmO8ov3Yf_1y4Au1GqQamiDwS_P6uksBtdqw2WayCqXZV7yhI--M7bacgenLbcebDJaXXXeH6KLMcEtso91KkyPgtbH8-8GGzs4gqJybsSgsPuClQVLumq92PDNol5DXWRizdfLpcxZUTawaTbQlE2ieQ3aVfgUEsbqscU5vmKMaVWfHwbcK3bJ5-1RFcsYyxYZy1bLclGkC1E2q1qWTZOxXC6XZJkBtq1OA05qbJvYKkKiZQ6VWjnvnpUci6QdAKL5aKFXXkP1TunRBtOIGeLiV0jPnJAaOn5U2DTxtccSHG5qg130CPJ1fpPoURXd-QNuNOWq>52952</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            std::ranges::cbegin falls back to lvalue behavior for a non-borrowed rvalue argument
        </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>
    Per [range.access.cbegin]/1.2, for an rvalue argument `E` of type `T`, `std::ranges::cbegin(E)` is expression-equivalent to `std::ranges::begin(static_cast<const T&&>(E))`. In this program:
```c++
#include <ranges>
#include <utility>

struct BeginMember {
  int x;
  constexpr const int *begin() const { return &x; }
};

int main() {
  const BeginMember r{};
  (void) std::ranges::cbegin(std::move(r)); // Should error and does not
  (void) std::ranges::begin(std::move(r)); // Should error and does
}
```
`E` is `std::move(r)`, and `T` is `const BeginMember`, but `std::ranges::cbegin(E)` (accepted) is not expression-equivalent to `std::ranges::begin(static_cast<const T&&>(E))` (rejected). It seems that the `cbegin` call with a `const` rvalue argument is binding to a `const` lvalue overload.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy9VFFv2yAQ_jX4BdUiOHbrBz-0SSrtYdKk9X3CcLbZiMkAp-2_34GdNO22qtKkSRhzHHzf3XF3rVXPzRdwlJR3Tow95EJK8D6XLfR6JOWW8PtVzgnf0M46KkbqjsJMQIXrpz2MgZKK7fCjtqPh-QBRfsAv3sCfD4oUtzgSup_XCzi_2RFex7vaU3g6OCTWdryCn5NGkgge7F9BThg-iKDlNyl8IMVG2tEH-kB4FUexO5Eknpx-GmkYkO3gbO_EPiKxLWG30eA0JOF3ccy7vNCjNJNCr4rNiXz3J-UUtNHh-UWbZh_cJAO9i6Z-hn0bA329gFOq0cEnUpzlZHuMw7xKesLPjqIPiwIxqIMwuRH1VYTAre1CjIsT5DxHmL04Q1wYMKNdWuei9gKBIsHN0WoVb77_lmft3h4BZbeEPRrH73HQr4OdjKLgXMokRZUFT0cbPsr1j1QvAXr95mdxt-TiZcpdUsxZHeGWJF8O_xbH5WQ7hY_XAC5j7R0CpADoFJn_UhaR2sF3kDM1VkmgHmDvsVYEkg2pqBeD8bgUxtBHHQYqzt7H_bedAV1o9aj02EeDX58181kMrjNWqDxTTaHqohZZ0MFA807MaIf8CC3kj4i7ILUwiKPG105tCmM3XrUWn_8R1FvDssmZZgjhkGBTwvTozdTm0u5RMOZ4-l1ho4iBQVF7P6Eh_L7kdcmzoZHrTl63as0Yq1pYyeuCsbJma1VBtyrrKjOiBeMbbK2E83bqcU5dkXOj21Ojwb1ym-mGM87ZinFWretVma9k3VWtqruO8UKt12TNAIvY5NGq3Lo-c00yEHE9Ko32wb8oBaZMPwIkcsQXUxisazbCw_NGuAAuS_40yZlf0LbPsQ">