libstdc++: Fix up semiregular-box partial specialization [PR100475]
authorPatrick Palka <ppalka@redhat.com>
Tue, 18 May 2021 04:28:44 +0000 (00:28 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 18 May 2021 04:28:44 +0000 (00:28 -0400)
commitfe993b469c528230d9a01e1ae2208610f960dd9f
treeda6f0ea5b3480b0632dfa72e05d4011a57d4ea69
parent03cf8d54e5c27cfe6b184cc96757cab30d8fa1df
libstdc++: Fix up semiregular-box partial specialization [PR100475]

This makes the in-place constructor of our partial specialization of
__box for already-semiregular types perform direct-non-list-initialization
(in accordance with the specification of the primary template), and
additionally makes the member function data() use std::__addressof.

libstdc++-v3/ChangeLog:

PR libstdc++/100475
* include/std/ranges (__box::__box): Use non-list-initialization
in member initializer list of in-place constructor of the
partial specialization for semiregular types.
(__box::operator->): Use std::__addressof.
* testsuite/std/ranges/adaptors/detail/semiregular_box.cc
(test02): New test.
* testsuite/std/ranges/single_view.cc (test04): New test.
libstdc++-v3/include/std/ranges
libstdc++-v3/testsuite/std/ranges/adaptors/detail/semiregular_box.cc
libstdc++-v3/testsuite/std/ranges/single_view.cc