]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Update LWG 4166 changes to concat_view::end() [PR120934]
authorPatrick Palka <ppalka@redhat.com>
Thu, 3 Jul 2025 14:55:17 +0000 (10:55 -0400)
committerPatrick Palka <ppalka@redhat.com>
Thu, 3 Jul 2025 14:56:52 +0000 (10:56 -0400)
commit612690936f5ddd122b60cf843cb4f40ae7ede436
tree587689c7b43aec1dbf89ebd92bee253218b5028a
parent6b19e40f982829c460439d270d34c5c848d90c6e
libstdc++: Update LWG 4166 changes to concat_view::end() [PR120934]

In r15-4555-gf191c830154565 we proactively implemented the initial
proposed resolution for LWG 4166 which later turned out to be
insufficient, since we must also require equality_comparable of the
underlying iterators before concat_view could be a common range.

This patch implements the updated P/R, requiring all underlying
iterators to be forward (which implies equality_comparable) before
making concat_view common, which fixes the testcase from this PR.

PR libstdc++/120934

libstdc++-v3/ChangeLog:

* include/std/ranges (concat_view::end): Refine condition
for returning an iterator instead of default_sentinel as
per the updated P/R for LWG 4166.
* testsuite/std/ranges/concat/1.cc (test05): New test.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
(cherry picked from commit c5a17e92ebf0c6f3887fb5698a1114a3fdf50576)
libstdc++-v3/include/std/ranges
libstdc++-v3/testsuite/std/ranges/concat/1.cc