diff options
author | Patrick Palka <ppalka@redhat.com> | 2023-11-09 15:15:08 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2023-11-09 15:15:08 -0500 |
commit | d63282fa5b587f1b994210212f236b998a332995 (patch) | |
tree | 5c291893ef03e864697b68b34fccb61da5fe10e3 /libcpp | |
parent | 6c2ac6e9ce152e120f166866c5c77924c726db99 (diff) | |
download | gcc-d63282fa5b587f1b994210212f236b998a332995.zip gcc-d63282fa5b587f1b994210212f236b998a332995.tar.gz gcc-d63282fa5b587f1b994210212f236b998a332995.tar.bz2 |
libstdc++: Fix forwarding in __take/drop_of_repeat_view [PR112453]
We need to respect the value category of the repeat_view passed to these
two functions when accessing the view's _M_value member. This revealed
that the space-efficient partial specialization of __box lacks && overloads
of operator* to match those of the primary template (inherited from
std::optional).
PR libstdc++/112453
libstdc++-v3/ChangeLog:
* include/std/ranges (__detail::__box<_Tp>::operator*): Define
&& overloads as well.
(__detail::__take_of_repeat_view): Forward __r when accessing
its _M_value member.
(__detail::__drop_of_repeat_view): Likewise.
* testsuite/std/ranges/repeat/1.cc (test07): New test.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions