libstdc++: P1983R0 Wording for GB301, US296, US292, US291, and US283
authorPatrick Palka <ppalka@redhat.com>
Tue, 18 Feb 2020 17:31:25 +0000 (12:31 -0500)
committerPatrick Palka <ppalka@redhat.com>
Wed, 19 Feb 2020 04:21:55 +0000 (23:21 -0500)
commit242b4fb7f4e6c6224e727fa5e9ed8a776d16ccf9
tree4529acc85a30bec27365baf92bf08a435dc45a03
parent6fa35f0e2843759cf5a4f2d309aa26090fd25f80
libstdc++: P1983R0 Wording for GB301, US296, US292, US291, and US283

Among other changes, P1983R0 resolves LWG 3278 in a different way, so this patch
also reverts the already-applied wording of LWG 3278.

The wording for US291 (the join_view::begin hunk) also required adding the
friend _Iterator<!_Const> to join_view::_Iterator.  This friend is needed so
that _Iterator's converting constructor can access the private members of an
_Iterator of the opposite constness.

The wording for US283 has already been applied it seems.

libstdc++-v3/ChangeLog:

P1983R0 Wording for GB301, US296, US292, US291, and US283
* include/std/ranges (filter_view::pred): New member function.
(join_view::_Iterator::_Iterator): Remove now-redundant comment since
P1983R0 fixes the highlighted issue in the same way.
(join_view::_Iterator<_Const>): Add friend
join_view::_Iterator<!_Const>.
(join_view::_M_inner): Remove mutable specifier, effectively reverting
the proposed wording changes of P3278.
(join_view::begin): Refine the condition for when to return a const
iterator.
(split_view::_OuterIter::_OuterIter): Adjust constraints.
* testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
exists and works.
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/ranges
libstdc++-v3/testsuite/std/ranges/adaptors/filter.cc