]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Specialize std::disable_sized_sentinel_for for std::move_iterator [PR116549]
authorJonathan Wakely <jwakely@redhat.com>
Mon, 2 Sep 2024 10:29:13 +0000 (11:29 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 16 Apr 2025 17:44:29 +0000 (18:44 +0100)
commit4cb91df31d65c3bca5c6d4c2efcd51f454def884
treeeb47cb09bcdebd75c01d237a700fa3bfeb1388c0
parent5f3811fd50113571127b849325ab8f6c674158af
libstdc++: Specialize std::disable_sized_sentinel_for for std::move_iterator [PR116549]

LWG 3736 added a partial specialization of this variable template for
two std::move_iterator types. This is needed for the case where the
types satisfy std::sentinel_for and are subtractable, but do not model
the semantics requirements of std::sized_sentinel_for.

libstdc++-v3/ChangeLog:

PR libstdc++/116549
* include/bits/stl_iterator.h (disable_sized_sentinel_for):
Define specialization for two move_iterator types, as per LWG
3736.
* testsuite/24_iterators/move_iterator/lwg3736.cc: New test.

(cherry picked from commit 819deae0a5bee079a7d5582fafaa098c26144ae8)
libstdc++-v3/include/bits/stl_iterator.h
libstdc++-v3/testsuite/24_iterators/move_iterator/lwg3736.cc [new file with mode: 0644]