<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gcc.git/libstdc++-v3/include/debug, branch trunk</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/'/>
<entry>
<title>libstdc++: [_GLIBCXX_DEBUG] Fix std::erase_if behavior for __gnu_debug::vector</title>
<updated>2025-11-20T18:10:20+00:00</updated>
<author>
<name>François Dumont</name>
<email>frs.dumont@gmail.com</email>
</author>
<published>2025-11-20T06:01:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=e166a0f5ee619f3f97107024ae4671dff9708507'/>
<id>e166a0f5ee619f3f97107024ae4671dff9708507</id>
<content type='text'>
When using directly __gnu_debug::vector the std::erase_if is called with a
reference to the std::vector base class and so is missing the invalidation
of the iterators implied by this operation.

To fix this provide a std::erase_if overload dedicated to __gnu_debug::vector.
Doing so we can cleanup the implementation dedicated to std::vector from any
_GLIBCXX_DEBUG consideration.

libstdc++-v3/ChangeLog:

	* include/debug/vector (std::erase_if, std::erase): New overloads for
	std::__debug::vector instances.
	* include/std/vector (std::erase_if, std::erase): Make overloads specific
	to normal std::vector implementation.
	* testsuite/23_containers/vector/debug/erase.cc: New test case.
	* testsuite/23_containers/vector/debug/invalidation/erase.cc: New test case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using directly __gnu_debug::vector the std::erase_if is called with a
reference to the std::vector base class and so is missing the invalidation
of the iterators implied by this operation.

To fix this provide a std::erase_if overload dedicated to __gnu_debug::vector.
Doing so we can cleanup the implementation dedicated to std::vector from any
_GLIBCXX_DEBUG consideration.

libstdc++-v3/ChangeLog:

	* include/debug/vector (std::erase_if, std::erase): New overloads for
	std::__debug::vector instances.
	* include/std/vector (std::erase_if, std::erase): Make overloads specific
	to normal std::vector implementation.
	* testsuite/23_containers/vector/debug/erase.cc: New test case.
	* testsuite/23_containers/vector/debug/invalidation/erase.cc: New test case.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Test specific feature test macros instead of __cplusplus</title>
<updated>2025-10-14T14:47:20+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-10-08T14:24:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=9b444204886227c9714158859bf21920e42e2656'/>
<id>9b444204886227c9714158859bf21920e42e2656</id>
<content type='text'>
This changes the associative and unordered containers to check
__glibcxx_node_extract, __glibcxx_generic_associative_lookup, and
__glibcxx_generic_unordered_lookup instead of just checking the value of
__cplusplus.

libstdc++-v3/ChangeLog:

	* include/bits/hashtable.h: Check specific feature test macros
	instead of checking thevalue of __cplusplus.
	* include/bits/stl_map.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/stl_tree.h: Likewise.
	* include/bits/unordered_map.h: Likewise.
	* include/bits/unordered_set.h: Likewise.
	* include/debug/map.h: Likewise.
	* include/debug/multimap.h: Likewise.
	* include/debug/multiset.h: Likewise.
	* include/debug/set.h: Likewise.
	* include/debug/unordered_map: Likewise.
	* include/debug/unordered_set: Likewise.

Reviewed-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This changes the associative and unordered containers to check
__glibcxx_node_extract, __glibcxx_generic_associative_lookup, and
__glibcxx_generic_unordered_lookup instead of just checking the value of
__cplusplus.

libstdc++-v3/ChangeLog:

	* include/bits/hashtable.h: Check specific feature test macros
	instead of checking thevalue of __cplusplus.
	* include/bits/stl_map.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/stl_tree.h: Likewise.
	* include/bits/unordered_map.h: Likewise.
	* include/bits/unordered_set.h: Likewise.
	* include/debug/map.h: Likewise.
	* include/debug/multimap.h: Likewise.
	* include/debug/multiset.h: Likewise.
	* include/debug/set.h: Likewise.
	* include/debug/unordered_map: Likewise.
	* include/debug/unordered_set: Likewise.

Reviewed-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Constrain __gnu_debug::bitset(const CharT*) constructor [PR121046]</title>
<updated>2025-09-12T13:08:23+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-07-12T12:09:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=f534db54a65b42638c08275338423063fe836f31'/>
<id>f534db54a65b42638c08275338423063fe836f31</id>
<content type='text'>
The r16-3435-gbbc0e70b610f19 change (for LWG 4294) needs to be applied
to the debug mode __gnu_debug::bitset as well as the normal one.

libstdc++-v3/ChangeLog:

	PR libstdc++/121046
	* include/debug/bitset (bitset(const CharT*, ...)): Add
	constraints on CharT type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The r16-3435-gbbc0e70b610f19 change (for LWG 4294) needs to be applied
to the debug mode __gnu_debug::bitset as well as the normal one.

libstdc++-v3/ChangeLog:

	PR libstdc++/121046
	* include/debug/bitset (bitset(const CharT*, ...)): Add
	constraints on CharT type.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: provide debug impl of P2697 ctor [PR119742]</title>
<updated>2025-07-28T09:34:32+00:00</updated>
<author>
<name>Nathan Myers</name>
<email>ncm@cantrip.org</email>
</author>
<published>2025-07-07T20:54:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=5a433ecf4da6fadc5154fa9458bda57d8a2d8ba2'/>
<id>5a433ecf4da6fadc5154fa9458bda57d8a2d8ba2</id>
<content type='text'>
This adds the new bitset constructor from string_view
defined in P2697 to the debug version of the type.

libstdc++-v3/Changelog:
	PR libstdc++/119742
	* include/debug/bitset: Add new ctor.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds the new bitset constructor from string_view
defined in P2697 to the debug version of the type.

libstdc++-v3/Changelog:
	PR libstdc++/119742
	* include/debug/bitset: Add new ctor.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Fix _GLIBCXX_DEBUG std::forward_list build regression</title>
<updated>2025-07-08T17:25:57+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-07-08T17:20:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=1f3bf202355f16d6ec0a9b37cb6a71be5f76b77f'/>
<id>1f3bf202355f16d6ec0a9b37cb6a71be5f76b77f</id>
<content type='text'>
Commit 2fd6f42c17a8040dbd3460ca34d93695dacf8575 broke _GLIBCXX_DEBUG
std::forward_list implementation.

libstdc++-v3/ChangeLog:

	* include/debug/forward_list (_Safe_forward_list&lt;&gt;::_M_swap):
	Adapt to _M_this() signature change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 2fd6f42c17a8040dbd3460ca34d93695dacf8575 broke _GLIBCXX_DEBUG
std::forward_list implementation.

libstdc++-v3/ChangeLog:

	* include/debug/forward_list (_Safe_forward_list&lt;&gt;::_M_swap):
	Adapt to _M_this() signature change.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Make debug iterator pointer sequence const [PR116369]</title>
<updated>2025-07-08T05:04:00+00:00</updated>
<author>
<name>François Dumont</name>
<email>frs.dumont@gmail.com</email>
</author>
<published>2025-03-27T18:02:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=2fd6f42c17a8040dbd3460ca34d93695dacf8575'/>
<id>2fd6f42c17a8040dbd3460ca34d93695dacf8575</id>
<content type='text'>
In revision a35dd276cbf6236e08bcf6e56e62c2be41cf6e3c the debug sequence
have been made mutable to allow attach iterators to const containers.
This change completes this fix by also declaring debug unordered container
members mutable.

Additionally the debug iterator sequence is now a pointer-to-const and so
_Safe_sequence_base _M_attach and all other methods are const qualified.
Not-const methods exported are preserved for abi backward compatibility.

libstdc++-v3/ChangeLog:

	PR c++/116369
	* config/abi/pre/gnu-versioned-namespace.ver: Use new const qualified symbols.
	* config/abi/pre/gnu.ver: Add new const qualified symbols.
	* include/debug/safe_base.h
	(_Safe_iterator_base::_M_sequence): Declare as pointer-to-const.
	(_Safe_iterator_base::_M_attach, _M_attach_single): New, take pointer-to-const
	_Safe_sequence_base.
	(_Safe_sequence_base::_M_detach_all, _M_detach_singular, _M_revalidate_singular)
	(_M_swap, _M_get_mutex): New, const qualified.
	(_Safe_sequence_base::_M_attach, _M_attach_single, _M_detach, _M_detach_single):
	const qualify.
	* include/debug/safe_container.h (_Safe_container&lt;&gt;::_M_cont): Add const qualifier.
	(_Safe_container&lt;&gt;::_M_swap_base): New.
	(_Safe_container(_Safe_container&amp;&amp;, const _Alloc&amp;, std::false_type)):
	Adapt to use latter.
	(_Safe_container&lt;&gt;::operator=(_Safe_container&amp;&amp;)): Likewise.
	(_Safe_container&lt;&gt;::_M_swap): Likewise and take parameter as const reference.
	* include/debug/safe_unordered_base.h
	(_Safe_local_iterator_base::_M_safe_container): New.
	(_Safe_local_iterator_base::_Safe_local_iterator_base): Take
	_Safe_unordered_container_base as pointer-to-const.
	(_Safe_unordered_container_base::_M_attach, _M_attach_single): New, take
	container as _Safe_unordered_container_base pointer-to-const.
	(_Safe_unordered_container_base::_M_local_iterators, _M_const_local_iterators):
	Add mutable.
	(_Safe_unordered_container_base::_M_detach_all, _M_swap): New, const qualify.
	(_Safe_unordered_container_base::_M_attach_local, _M_attach_local_single)
	(_M_detach_local, _M_detach_local_single): Add const qualifier.
	* include/debug/safe_unordered_container.h (_Safe_unordered_container::_M_self()): New.
	* include/debug/safe_unordered_container.tcc
	(_Safe_unordered_container::_M_invalidate_if, _M_invalidated_local_if): Use latter.
	* include/debug/safe_iterator.h (_Safe_iterator&lt;&gt;::_M_attach, _M_attach_single):
	Take _Safe_sequence_base as pointer-to-const.
	(_Safe_iterator&lt;&gt;::_M_get_sequence): Add const_cast and comment about it.
	* include/debug/safe_local_iterator.h (_Safe_local_iterator&lt;&gt;): Replace usages
	of _M_sequence member by _M_safe_container().
	(_Safe_local_iterator&lt;&gt;::_M_attach, _M_attach_single): Take
	_Safe_unordered_container_base as pointer-to-const.
	(_Safe_local_iterator&lt;&gt;::_M_get_sequence): Rename into...
	(_Safe_local_iterator&lt;&gt;::_M_get_ucontainer): ...this. Add necessary const_cast and
	comment to explain it.
	(_Safe_local_iterator&lt;&gt;::_M_is_begin, _M_is_end): Adapt.
	* include/debug/safe_local_iterator.tcc: Adapt.
	* include/debug/safe_sequence.h
	(_Safe_sequence&lt;&gt;::_M_invalidate_if, _M_transfer_from_if): Add const qualifier.
	* include/debug/safe_sequence.tcc: Adapt.
	* include/debug/deque (std::__debug::deque::erase): Adapt to use new const
	qualified methods.
	* include/debug/formatter.h: Adapt.
	* include/debug/forward_list (_Safe_forward_list::_M_this): Add const
	qualification and return pointer for consistency with 'this' keyword.
	(_Safe_forward_list::_M_swap_aux): Rename into...
	(_Safe_forward_list::_S_swap_aux): ...this and take sequence as const reference.
	(forward_list&lt;&gt;::resize): Adapt to use const methods.
	* include/debug/list (list&lt;&gt;::resize): Likewise.
	* src/c++11/debug.cc: Adapt to const qualification.
	* testsuite/util/testsuite_containers.h
	(forward_members_unordered::forward_members_unordered): Add check on local_iterator
	conversion to const_local_iterator.
	(forward_members::forward_members): Add check on iterator conversion to
	const_iterator.
	* testsuite/23_containers/unordered_map/const_container.cc: New test case.
	* testsuite/23_containers/unordered_multimap/const_container.cc: New test case.
	* testsuite/23_containers/unordered_multiset/const_container.cc: New test case.
	* testsuite/23_containers/unordered_set/const_container.cc: New test case.
	* testsuite/23_containers/vector/debug/mutex_association.cc: Adapt.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In revision a35dd276cbf6236e08bcf6e56e62c2be41cf6e3c the debug sequence
have been made mutable to allow attach iterators to const containers.
This change completes this fix by also declaring debug unordered container
members mutable.

Additionally the debug iterator sequence is now a pointer-to-const and so
_Safe_sequence_base _M_attach and all other methods are const qualified.
Not-const methods exported are preserved for abi backward compatibility.

libstdc++-v3/ChangeLog:

	PR c++/116369
	* config/abi/pre/gnu-versioned-namespace.ver: Use new const qualified symbols.
	* config/abi/pre/gnu.ver: Add new const qualified symbols.
	* include/debug/safe_base.h
	(_Safe_iterator_base::_M_sequence): Declare as pointer-to-const.
	(_Safe_iterator_base::_M_attach, _M_attach_single): New, take pointer-to-const
	_Safe_sequence_base.
	(_Safe_sequence_base::_M_detach_all, _M_detach_singular, _M_revalidate_singular)
	(_M_swap, _M_get_mutex): New, const qualified.
	(_Safe_sequence_base::_M_attach, _M_attach_single, _M_detach, _M_detach_single):
	const qualify.
	* include/debug/safe_container.h (_Safe_container&lt;&gt;::_M_cont): Add const qualifier.
	(_Safe_container&lt;&gt;::_M_swap_base): New.
	(_Safe_container(_Safe_container&amp;&amp;, const _Alloc&amp;, std::false_type)):
	Adapt to use latter.
	(_Safe_container&lt;&gt;::operator=(_Safe_container&amp;&amp;)): Likewise.
	(_Safe_container&lt;&gt;::_M_swap): Likewise and take parameter as const reference.
	* include/debug/safe_unordered_base.h
	(_Safe_local_iterator_base::_M_safe_container): New.
	(_Safe_local_iterator_base::_Safe_local_iterator_base): Take
	_Safe_unordered_container_base as pointer-to-const.
	(_Safe_unordered_container_base::_M_attach, _M_attach_single): New, take
	container as _Safe_unordered_container_base pointer-to-const.
	(_Safe_unordered_container_base::_M_local_iterators, _M_const_local_iterators):
	Add mutable.
	(_Safe_unordered_container_base::_M_detach_all, _M_swap): New, const qualify.
	(_Safe_unordered_container_base::_M_attach_local, _M_attach_local_single)
	(_M_detach_local, _M_detach_local_single): Add const qualifier.
	* include/debug/safe_unordered_container.h (_Safe_unordered_container::_M_self()): New.
	* include/debug/safe_unordered_container.tcc
	(_Safe_unordered_container::_M_invalidate_if, _M_invalidated_local_if): Use latter.
	* include/debug/safe_iterator.h (_Safe_iterator&lt;&gt;::_M_attach, _M_attach_single):
	Take _Safe_sequence_base as pointer-to-const.
	(_Safe_iterator&lt;&gt;::_M_get_sequence): Add const_cast and comment about it.
	* include/debug/safe_local_iterator.h (_Safe_local_iterator&lt;&gt;): Replace usages
	of _M_sequence member by _M_safe_container().
	(_Safe_local_iterator&lt;&gt;::_M_attach, _M_attach_single): Take
	_Safe_unordered_container_base as pointer-to-const.
	(_Safe_local_iterator&lt;&gt;::_M_get_sequence): Rename into...
	(_Safe_local_iterator&lt;&gt;::_M_get_ucontainer): ...this. Add necessary const_cast and
	comment to explain it.
	(_Safe_local_iterator&lt;&gt;::_M_is_begin, _M_is_end): Adapt.
	* include/debug/safe_local_iterator.tcc: Adapt.
	* include/debug/safe_sequence.h
	(_Safe_sequence&lt;&gt;::_M_invalidate_if, _M_transfer_from_if): Add const qualifier.
	* include/debug/safe_sequence.tcc: Adapt.
	* include/debug/deque (std::__debug::deque::erase): Adapt to use new const
	qualified methods.
	* include/debug/formatter.h: Adapt.
	* include/debug/forward_list (_Safe_forward_list::_M_this): Add const
	qualification and return pointer for consistency with 'this' keyword.
	(_Safe_forward_list::_M_swap_aux): Rename into...
	(_Safe_forward_list::_S_swap_aux): ...this and take sequence as const reference.
	(forward_list&lt;&gt;::resize): Adapt to use const methods.
	* include/debug/list (list&lt;&gt;::resize): Likewise.
	* src/c++11/debug.cc: Adapt to const qualification.
	* testsuite/util/testsuite_containers.h
	(forward_members_unordered::forward_members_unordered): Add check on local_iterator
	conversion to const_local_iterator.
	(forward_members::forward_members): Add check on iterator conversion to
	const_iterator.
	* testsuite/23_containers/unordered_map/const_container.cc: New test case.
	* testsuite/23_containers/unordered_multimap/const_container.cc: New test case.
	* testsuite/23_containers/unordered_multiset/const_container.cc: New test case.
	* testsuite/23_containers/unordered_set/const_container.cc: New test case.
	* testsuite/23_containers/vector/debug/mutex_association.cc: Adapt.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Fix -Wmismatched-tags warnings for _Safe_iterator [PR120112]</title>
<updated>2025-05-06T16:19:25+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-05-06T11:47:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=ccf0b93b3ccf67b98fbd5096852c369d2cac7904'/>
<id>ccf0b93b3ccf67b98fbd5096852c369d2cac7904</id>
<content type='text'>
This causes an ICE as shown in the PR, but it should be fixed in the
library code anyway.

libstdc++-v3/ChangeLog:

	PR c++/120112
	* include/bits/ptr_traits.h (_Safe_iterator_base): Use class
	keyword in class-head of declaration.
	* include/debug/debug.h (_Safe_iterator): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This causes an ICE as shown in the PR, but it should be fixed in the
library code anyway.

libstdc++-v3/ChangeLog:

	PR c++/120112
	* include/bits/ptr_traits.h (_Safe_iterator_base): Use class
	keyword in class-head of declaration.
	* include/debug/debug.h (_Safe_iterator): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Implement missing allocator-aware constructors for unordered containers.</title>
<updated>2025-04-28T08:09:26+00:00</updated>
<author>
<name>Tomasz Kamiński</name>
<email>tkaminsk@redhat.com</email>
</author>
<published>2025-03-18T15:10:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=1ecd95ea1e0b36e289061262639460d6dc5fd209'/>
<id>1ecd95ea1e0b36e289061262639460d6dc5fd209</id>
<content type='text'>
This patch implements remainder of LWG2713 (after r15-8293-g64f5c854597759)
by adding missing allocator aware version of unordered associative containers
constructors accepting pair of iterators or initializer_list, and corresponding
deduction guides.

libstdc++-v3/ChangeLog:

	* include/bits/unordered_map.h (unordered_map):
	Define constructors accepting:
	(_InputIterator, _InputIterator, const allocator_type&amp;),
	(initializer_list&lt;value_type&gt;, const allocator_type&amp;),
	(unordered_multimap): Likewise.
	* include/debug/unordered_map (unordered_map): Likewise.
	(unordered_multimap): Likewise.
	* include/bits/unordered_set.h (unordered_set):
	Define constructors and deduction guide accepting:
	(_InputIterator, _InputIterator, const allocator_type&amp;),
	(initializer_list&lt;value_type&gt;, const allocator_type&amp;),
	(unordered_multiset): Likewise.
	* include/debug/unordered_set (unordered_set): Likewise.
	(unordered_multiset): Likewise.
	* testsuite/23_containers/unordered_map/cons/66055.cc: New tests.
	* testsuite/23_containers/unordered_map/cons/deduction.cc: New tests.
	* testsuite/23_containers/unordered_multimap/cons/66055.cc: New tests.
	* testsuite/23_containers/unordered_multimap/cons/deduction.cc:	New
	tests.
	* testsuite/23_containers/unordered_multiset/cons/66055.cc: New tests.
	* testsuite/23_containers/unordered_multiset/cons/deduction.cc:	New
	tests.
	* testsuite/23_containers/unordered_set/cons/66055.cc: New tests.
	* testsuite/23_containers/unordered_set/cons/deduction.cc: New tests.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Signed-off-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements remainder of LWG2713 (after r15-8293-g64f5c854597759)
by adding missing allocator aware version of unordered associative containers
constructors accepting pair of iterators or initializer_list, and corresponding
deduction guides.

libstdc++-v3/ChangeLog:

	* include/bits/unordered_map.h (unordered_map):
	Define constructors accepting:
	(_InputIterator, _InputIterator, const allocator_type&amp;),
	(initializer_list&lt;value_type&gt;, const allocator_type&amp;),
	(unordered_multimap): Likewise.
	* include/debug/unordered_map (unordered_map): Likewise.
	(unordered_multimap): Likewise.
	* include/bits/unordered_set.h (unordered_set):
	Define constructors and deduction guide accepting:
	(_InputIterator, _InputIterator, const allocator_type&amp;),
	(initializer_list&lt;value_type&gt;, const allocator_type&amp;),
	(unordered_multiset): Likewise.
	* include/debug/unordered_set (unordered_set): Likewise.
	(unordered_multiset): Likewise.
	* testsuite/23_containers/unordered_map/cons/66055.cc: New tests.
	* testsuite/23_containers/unordered_map/cons/deduction.cc: New tests.
	* testsuite/23_containers/unordered_multimap/cons/66055.cc: New tests.
	* testsuite/23_containers/unordered_multimap/cons/deduction.cc:	New
	tests.
	* testsuite/23_containers/unordered_multiset/cons/66055.cc: New tests.
	* testsuite/23_containers/unordered_multiset/cons/deduction.cc:	New
	tests.
	* testsuite/23_containers/unordered_set/cons/66055.cc: New tests.
	* testsuite/23_containers/unordered_set/cons/deduction.cc: New tests.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Signed-off-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Define __cpp_lib_containers_ranges in appropriate headers [PR111055]</title>
<updated>2025-04-11T11:56:03+00:00</updated>
<author>
<name>Tomasz Kamiński</name>
<email>tkaminsk@redhat.com</email>
</author>
<published>2025-03-21T11:55:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=ae54d8cb51eb5cc1f5a3d319cc1840d2e9bfcbfc'/>
<id>ae54d8cb51eb5cc1f5a3d319cc1840d2e9bfcbfc</id>
<content type='text'>
This is final piece of P1206R7, adding a feature test macros,
as range constructors and member operations are now implemented for
all containers and adaptors.

For consistency with the proposal, all new container operations and
helpers are now defined if __glibcxx_containers_ranges, instead
of __glibcxx_ranges_to_container.

	PR libstdc++/111055

libstdc++-v3/ChangeLog:

	* include/bits/version.def (containers_ranges): Define.
	* include/bits/version.h: Regenerate.
	* include/bits/ranges_base.h (__detail::__container_compatible_range)
	(__detail::__range_to_alloc_type, __detail::__range_mapped_type)
	(__detail::__range_key_type): Depend on __glibcxx_containers_ranges
	instead of __glibcxx_ranges_to_container.
	* include/bits/basic_string.h: Replace __glibcxx_ranges_to_container with
	__glibcxx_containers_ranges.
	* include/bits/cow_string.h: Likewise.
	* include/bits/deque.tcc: Likewise.
	* include/bits/forward_list.h: Likewise.
	* include/bits/stl_bvector.h: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_map.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_queue.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/stl_stack.h: Likewise.
	* include/bits/stl_vector.h: Likewise.
	* include/bits/unordered_map.h: Likewise.
	* include/bits/unordered_set.h: Likewise.
	* include/bits/vector.tcc: Likewise.
	* include/debug/deque: Likewise.
	* include/debug/forward_list: Likewise.
	* include/debug/list: Likewise.
	* include/debug/map.h: Likewise.
	* include/debug/multimap.h: Likewise.
	* include/debug/multiset.h: Likewise.
	* include/debug/set.h: Likewise.
	* include/debug/unordered_map: Likewise.
	* include/debug/unordered_set: Likewise.
	* include/debug/vector: Likewise.
	* include/std/deque: Provide __cpp_lib_containers_ranges.
	* include/std/forward_list: Likewise.
	* include/std/list: Likewise.
	* include/std/map: Likewise.
	* include/std/queue: Likewise.
	* include/std/set: Likewise.
	* include/std/stack: Likewise.
	* include/std/string: Likewise.
	* include/std/unordered_map: Likewise.
	* include/std/unordered_set: Likewise.
	* include/std/vector: Likewise.
	* testsuite/21_strings/basic_string/cons/from_range.cc: Test for value
	__cpp_lib_containers_ranges.
	* testsuite/23_containers/deque/cons/from_range.cc: Likewise.
	* testsuite/23_containers/forward_list/cons/from_range.cc: Likewise.
	* testsuite/23_containers/list/cons/from_range.cc: Likewise.
	* testsuite/23_containers/map/cons/from_range.cc: Likewise.
	* testsuite/23_containers/multimap/cons/from_range.cc: Likewise.
	* testsuite/23_containers/multiset/cons/from_range.cc: Likewise.
	* testsuite/23_containers/priority_queue/cons_from_range.cc: Likewise.
	* testsuite/23_containers/queue/cons_from_range.cc: Likewise.
	* testsuite/23_containers/set/cons/from_range.cc: Likewise.
	* testsuite/23_containers/stack/cons_from_range.cc: Likewise.
	* testsuite/23_containers/unordered_map/cons/from_range.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/cons/from_range.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/cons/from_range.cc: Likewise.
	* testsuite/23_containers/unordered_set/cons/from_range.cc: Likewise.
	* testsuite/23_containers/vector/bool/cons/from_range.cc: Likewise.
	* testsuite/23_containers/vector/cons/from_range.cc: Likewise.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Signed-off-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is final piece of P1206R7, adding a feature test macros,
as range constructors and member operations are now implemented for
all containers and adaptors.

For consistency with the proposal, all new container operations and
helpers are now defined if __glibcxx_containers_ranges, instead
of __glibcxx_ranges_to_container.

	PR libstdc++/111055

libstdc++-v3/ChangeLog:

	* include/bits/version.def (containers_ranges): Define.
	* include/bits/version.h: Regenerate.
	* include/bits/ranges_base.h (__detail::__container_compatible_range)
	(__detail::__range_to_alloc_type, __detail::__range_mapped_type)
	(__detail::__range_key_type): Depend on __glibcxx_containers_ranges
	instead of __glibcxx_ranges_to_container.
	* include/bits/basic_string.h: Replace __glibcxx_ranges_to_container with
	__glibcxx_containers_ranges.
	* include/bits/cow_string.h: Likewise.
	* include/bits/deque.tcc: Likewise.
	* include/bits/forward_list.h: Likewise.
	* include/bits/stl_bvector.h: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_map.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_queue.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/stl_stack.h: Likewise.
	* include/bits/stl_vector.h: Likewise.
	* include/bits/unordered_map.h: Likewise.
	* include/bits/unordered_set.h: Likewise.
	* include/bits/vector.tcc: Likewise.
	* include/debug/deque: Likewise.
	* include/debug/forward_list: Likewise.
	* include/debug/list: Likewise.
	* include/debug/map.h: Likewise.
	* include/debug/multimap.h: Likewise.
	* include/debug/multiset.h: Likewise.
	* include/debug/set.h: Likewise.
	* include/debug/unordered_map: Likewise.
	* include/debug/unordered_set: Likewise.
	* include/debug/vector: Likewise.
	* include/std/deque: Provide __cpp_lib_containers_ranges.
	* include/std/forward_list: Likewise.
	* include/std/list: Likewise.
	* include/std/map: Likewise.
	* include/std/queue: Likewise.
	* include/std/set: Likewise.
	* include/std/stack: Likewise.
	* include/std/string: Likewise.
	* include/std/unordered_map: Likewise.
	* include/std/unordered_set: Likewise.
	* include/std/vector: Likewise.
	* testsuite/21_strings/basic_string/cons/from_range.cc: Test for value
	__cpp_lib_containers_ranges.
	* testsuite/23_containers/deque/cons/from_range.cc: Likewise.
	* testsuite/23_containers/forward_list/cons/from_range.cc: Likewise.
	* testsuite/23_containers/list/cons/from_range.cc: Likewise.
	* testsuite/23_containers/map/cons/from_range.cc: Likewise.
	* testsuite/23_containers/multimap/cons/from_range.cc: Likewise.
	* testsuite/23_containers/multiset/cons/from_range.cc: Likewise.
	* testsuite/23_containers/priority_queue/cons_from_range.cc: Likewise.
	* testsuite/23_containers/queue/cons_from_range.cc: Likewise.
	* testsuite/23_containers/set/cons/from_range.cc: Likewise.
	* testsuite/23_containers/stack/cons_from_range.cc: Likewise.
	* testsuite/23_containers/unordered_map/cons/from_range.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/cons/from_range.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/cons/from_range.cc: Likewise.
	* testsuite/23_containers/unordered_set/cons/from_range.cc: Likewise.
	* testsuite/23_containers/vector/bool/cons/from_range.cc: Likewise.
	* testsuite/23_containers/vector/cons/from_range.cc: Likewise.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Signed-off-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Add P1206R7 range operations to std::deque [PR111055]</title>
<updated>2025-03-26T09:37:02+00:00</updated>
<author>
<name>Tomasz Kamiński</name>
<email>tkaminsk@redhat.com</email>
</author>
<published>2025-03-21T08:03:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=157c14a387fc880b31e9e42deb6960b3143d3c2d'/>
<id>157c14a387fc880b31e9e42deb6960b3143d3c2d</id>
<content type='text'>
This is another piece of P1206R7, adding from_range constructor, append_range,
prepend_range, insert_range, and assign_range members to std::deque.

For append_front of input non-sized range, we are emplacing element at the front and
then reverse inserted elements. This does not existing elements, and properly handle
aliasing ranges.

For insert_range, the handling of insertion in the middle of input-only ranges
that are sized could be optimized, we still insert nodes one-by-one in such case.
For forward and stronger ranges, we reduce them to common_range case, by computing
the iterator when computing the distance. This is slightly suboptimal, as it require
range to be iterated for non-common forward ranges that are sized, but reduces
number of instantiations.

This patch extract _M_range_prepend, _M_range_append helper functions that accepts
(iterator, sentinel) pair. This all used in all standard modes.

	PR libstdc++/111055

libstdc++-v3/ChangeLog:

	* include/bits/deque.tcc (deque::prepend_range, deque::append_range)
	(deque::insert_range, __advance_dist): Define.
	(deque::_M_range_prepend, deque::_M_range_append):
	Extract from _M_range_insert_aux for _ForwardIterator(s).
	* include/bits/stl_deque.h (deque::assign_range): Define.
	(deque::prepend_range, deque::append_range, deque::insert_range):
	Declare.
	(deque(from_range_t, _Rg&amp;&amp;, const allocator_type&amp;)): Define constructor
	and deduction guide.
	* include/debug/deque (deque::prepend_range, deque::append_range)
	(deque::assign_range):	Define.
	(deque(from_range_t, _Rg&amp;&amp;, const allocator_type&amp;)): Define constructor
	and deduction guide.
	* testsuite/23_containers/deque/cons/from_range.cc: New test.
	* testsuite/23_containers/deque/modifiers/append_range.cc: New test.
	* testsuite/23_containers/deque/modifiers/assign/assign_range.cc:
	New test.
	* testsuite/23_containers/deque/modifiers/prepend_range.cc: New test.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Signed-off-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is another piece of P1206R7, adding from_range constructor, append_range,
prepend_range, insert_range, and assign_range members to std::deque.

For append_front of input non-sized range, we are emplacing element at the front and
then reverse inserted elements. This does not existing elements, and properly handle
aliasing ranges.

For insert_range, the handling of insertion in the middle of input-only ranges
that are sized could be optimized, we still insert nodes one-by-one in such case.
For forward and stronger ranges, we reduce them to common_range case, by computing
the iterator when computing the distance. This is slightly suboptimal, as it require
range to be iterated for non-common forward ranges that are sized, but reduces
number of instantiations.

This patch extract _M_range_prepend, _M_range_append helper functions that accepts
(iterator, sentinel) pair. This all used in all standard modes.

	PR libstdc++/111055

libstdc++-v3/ChangeLog:

	* include/bits/deque.tcc (deque::prepend_range, deque::append_range)
	(deque::insert_range, __advance_dist): Define.
	(deque::_M_range_prepend, deque::_M_range_append):
	Extract from _M_range_insert_aux for _ForwardIterator(s).
	* include/bits/stl_deque.h (deque::assign_range): Define.
	(deque::prepend_range, deque::append_range, deque::insert_range):
	Declare.
	(deque(from_range_t, _Rg&amp;&amp;, const allocator_type&amp;)): Define constructor
	and deduction guide.
	* include/debug/deque (deque::prepend_range, deque::append_range)
	(deque::assign_range):	Define.
	(deque(from_range_t, _Rg&amp;&amp;, const allocator_type&amp;)): Define constructor
	and deduction guide.
	* testsuite/23_containers/deque/cons/from_range.cc: New test.
	* testsuite/23_containers/deque/modifiers/append_range.cc: New test.
	* testsuite/23_containers/deque/modifiers/assign/assign_range.cc:
	New test.
	* testsuite/23_containers/deque/modifiers/prepend_range.cc: New test.

Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Signed-off-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
