]> 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:55:17 +0000 (10:55 -0400)
commitc5a17e92ebf0c6f3887fb5698a1114a3fdf50576
tree641c4a6bbb604d85c3cada218052365def67f567
parent13c766066e23eb6ddf6bad7a5664b9d3ca8c1974
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>
libstdc++-v3/include/std/ranges
libstdc++-v3/testsuite/std/ranges/concat/1.cc