Skip to content
Snippets Groups Projects
Commit 8543dc52 authored by Patrick Palka's avatar Patrick Palka
Browse files

libstdc++: Sync concat_view with final P2542 revision [PR115209]


Our concat_view implementation is accidentally based off of an older
revision of the paper, P2542R7 instead of R8.  As far as I can tell the
only semantic change in the final revision is the relaxed constraints on
the iterator's iter/sent operator- overloads, which this patch updates.

This patch also simplifies the concat_view::end wording via C++26 pack
indexing as per the final revision.  In turn we make the availability of
this library feature conditional on __cpp_pack_indexing.  (Note pack
indexing is implemented in GCC 15 and Clang 19).

	PR libstdc++/115209

libstdc++-v3/ChangeLog:

	* include/bits/version.def (ranges_concat): Depend on
	__cpp_pack_indexing.
	* include/bits/version.h: Regenerate.
	* include/std/ranges (__detail::__last_is_common): Remove.
	(__detail::__all_but_first_sized): New.
	(concat_view::end): Use C++26 pack indexing instead of
	__last_is_common as per R8 of P2542.
	(concat_view::iterator::operator-): Update constraints on
	iter/sent overloads as per R8 of P2542.

Reviewed-by: default avatarJonathan Wakely <jwakely@redhat.com>
parent 6d8e9cdb
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment