libstdc++: Apply proposed resolution for LWG 3449 [PR95322]
authorPatrick Palka <ppalka@redhat.com>
Mon, 12 Oct 2020 17:46:21 +0000 (13:46 -0400)
committerPatrick Palka <ppalka@redhat.com>
Mon, 12 Oct 2020 17:46:21 +0000 (13:46 -0400)
commite066821b6f6b7332c7a67981f7b33c9ba0ccaee7
treec5da81796b6a0a0069e3440a760abea0ed6e690b
parentc840700852c69b2bf7a73df77d8d9f0658330dae
libstdc++: Apply proposed resolution for LWG 3449 [PR95322]

Now that the frontend bug PR96805 is fixed, we can cleanly apply the
proposed resolution for this issue.

This slightly deviates from the proposed resolution by declaring _CI a
member of take_view instead of take_view::_Sentinel, since it doesn't
depend on anything within _Sentinel anymore.

libstdc++-v3/ChangeLog:

PR libstdc++/95322
* include/std/ranges (take_view::_CI): Define this alias
template as per LWG 3449 and remove ...
(take_view::_Sentinel::_CI): ... this type alias.
(take_view::_Sentinel::operator==): Adjust use of _CI
accordingly.  Define a second overload that accepts an iterator
of the opposite constness as per LWG 3449.
(take_while_view::_Sentinel::operator==): Likewise.
* testsuite/std/ranges/adaptors/95322.cc: Add tests for LWG 3449.
libstdc++-v3/include/std/ranges
libstdc++-v3/testsuite/std/ranges/adaptors/95322.cc