]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Implement P2367 changes to avoid some list-initialization
authorPatrick Palka <ppalka@redhat.com>
Fri, 30 Apr 2021 14:59:20 +0000 (10:59 -0400)
committerPatrick Palka <ppalka@redhat.com>
Fri, 30 Apr 2021 14:59:20 +0000 (10:59 -0400)
commit6e00d9bb113b531be15bc71cad2f1742648ba18a
tree17ca905a33f0f0236405808eb61d6116076f4efd
parent47915ef8477569b2fbd8001996aa4e542284bb24
libstdc++: Implement P2367 changes to avoid some list-initialization

This implements the wording changes of P2367R0 "Remove misuses of
list-initialization from Clause 24", modulo the parts that depend
on P1739R4 which we don't yet implement (due to LWG 3407).

libstdc++-v3/ChangeLog:

* include/bits/ranges_util.h (subrange::subrange): Avoid
list-initialization in delegating constructor.
* include/std/ranges (single_view): Replace implicit guide
with explicit deduction guide that decays its argument.
(_Single::operator()): Avoid CTAD when constructing the
single_view object.
(_Iota::operator()): Avoid list-initialization.
(__detail::__can_filter_view, _Filter::operator()): Likewise.
(__detail::__can_transform_view, _Transform::operator()): Likewise.
(take_view::begin): Likewise.
(__detail::__can_take_view, _Take::operator()): Likewise.
(__detail::__can_take_while_view, _TakeWhile::operator()): Likewise.
(__detail::__can_drop_view, _Drop::operator()): Likewise.
(__detail::__can_drop_while_view, _DropWhile::operator()): Likewise.
(split_view::split_view): Use views::single when initializing
_M_pattern.
(__detail::__can_split_view, _Split::operator()): Avoid
list-initialization.
(_Counted::operator()): Likewise.
* testsuite/std/ranges/p2367.cc: New test.
libstdc++-v3/include/bits/ranges_util.h
libstdc++-v3/include/std/ranges
libstdc++-v3/testsuite/std/ranges/p2367.cc [new file with mode: 0644]