<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gcc.git/libstdc++-v3/include/bits, branch master</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++: Include &lt;ostream&gt; in &lt;regex&gt; for debug mode</title>
<updated>2025-11-21T15:30:49+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-11-21T12:02:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=e8cf136b1a281db54edf5f824e8b08e5b757269f'/>
<id>e8cf136b1a281db54edf5f824e8b08e5b757269f</id>
<content type='text'>
I don't know what changed, but I'm seeing some new failures:

FAIL: 23_containers/vector/capacity/114945.cc  -std=gnu++11 (test for excess errors)
FAIL: 23_containers/vector/capacity/114945.cc  -std=gnu++14 (test for excess errors)
FAIL: 23_containers/vector/capacity/114945.cc  -std=gnu++17 (test for excess errors)
FAIL: 28_regex/basic_regex/85098.cc  -std=gnu++11 (test for excess errors)
FAIL: 28_regex/basic_regex/85098.cc  -std=gnu++14 (test for excess errors)
FAIL: 28_regex/basic_regex/85098.cc  -std=gnu++17 (test for excess errors)
FAIL: 28_regex/simple_c++11.cc   (test for excess errors)

libstdc++-v3/ChangeLog:

	* include/bits/regex_automaton.tcc [_GLIBCXX_DEBUG]: Include
	&lt;ostream&gt; so that _State_base::_M_print etc. can use it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I don't know what changed, but I'm seeing some new failures:

FAIL: 23_containers/vector/capacity/114945.cc  -std=gnu++11 (test for excess errors)
FAIL: 23_containers/vector/capacity/114945.cc  -std=gnu++14 (test for excess errors)
FAIL: 23_containers/vector/capacity/114945.cc  -std=gnu++17 (test for excess errors)
FAIL: 28_regex/basic_regex/85098.cc  -std=gnu++11 (test for excess errors)
FAIL: 28_regex/basic_regex/85098.cc  -std=gnu++14 (test for excess errors)
FAIL: 28_regex/basic_regex/85098.cc  -std=gnu++17 (test for excess errors)
FAIL: 28_regex/simple_c++11.cc   (test for excess errors)

libstdc++-v3/ChangeLog:

	* include/bits/regex_automaton.tcc [_GLIBCXX_DEBUG]: Include
	&lt;ostream&gt; so that _State_base::_M_print etc. can use it.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: store the length after the store of the null character</title>
<updated>2025-11-19T17:14:05+00:00</updated>
<author>
<name>Andrew Pinski</name>
<email>andrew.pinski@oss.qualcomm.com</email>
</author>
<published>2025-11-18T20:57:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=47ebad54abc127934693e7ace75a3cb08d6bc36c'/>
<id>47ebad54abc127934693e7ace75a3cb08d6bc36c</id>
<content type='text'>
This improves the code generation slightly for std::string because of
aliasing. In many cases the length will be read again and the store of
the null character will cause the length to be re-read due to aliasing
requirements of the char type. So swapping around the stores will allow
the length not to have to be reloaded from memory and will allow
for more optimizations.

Bootstrapped and tested on x86_64-linux-gnu.

libstdc++-v3/ChangeLog:

	* include/bits/basic_string.h (basic_string::M_set_length): Swap
	around the order of traits_type::assign and _M_length so that
	_M_length is at the end.

Signed-off-by: Andrew Pinski &lt;andrew.pinski@oss.qualcomm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This improves the code generation slightly for std::string because of
aliasing. In many cases the length will be read again and the store of
the null character will cause the length to be re-read due to aliasing
requirements of the char type. So swapping around the stores will allow
the length not to have to be reloaded from memory and will allow
for more optimizations.

Bootstrapped and tested on x86_64-linux-gnu.

libstdc++-v3/ChangeLog:

	* include/bits/basic_string.h (basic_string::M_set_length): Swap
	around the order of traits_type::assign and _M_length so that
	_M_length is at the end.

Signed-off-by: Andrew Pinski &lt;andrew.pinski@oss.qualcomm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Fix construction function_ref from nontype&lt;&amp;S::x&gt; and reference_wrapper [PR121858]</title>
<updated>2025-11-18T10:51:16+00:00</updated>
<author>
<name>Tomasz Kamiński</name>
<email>tkaminsk@redhat.com</email>
</author>
<published>2025-10-24T14:45:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=ac45382d0c06bc1a90ce74e0379e52496ab3bffe'/>
<id>ac45382d0c06bc1a90ce74e0379e52496ab3bffe</id>
<content type='text'>
To reduce instantiation count, function_ref(nontype&lt;&amp;S::x&gt;, r) previously
reused the invoker from function_ref(nontype&lt;&amp;S::x&gt;, &amp;r). This assumed r was
always a reference to S or a derived class. However, this constructor is also
valid for lvalues (but not rvalues) of reference_wrapper specializations.

This patch fixes this by limiting above optimization only to situations,
when argument is not specialization of reference_wrapper. This is achieved
bu comparing __inv_unwrap&lt;_Td&gt;::type with _Td. We use __inv_unwrap because
unwrap_reference_t does not handle cv-qualified types.

	PR libstdc++/121858

libstdc++-v3/ChangeLog:

	* include/bits/funcref_impl.h
	(function_ref::function_ref(nontype&lt;__fn&gt;, _Up&amp;&amp;)): Handle.
	reference_wrapper.
	* testsuite/20_util/function_ref/call.cc: Call and update
	test05(). Add new test06() for reference_wrapper.

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>
To reduce instantiation count, function_ref(nontype&lt;&amp;S::x&gt;, r) previously
reused the invoker from function_ref(nontype&lt;&amp;S::x&gt;, &amp;r). This assumed r was
always a reference to S or a derived class. However, this constructor is also
valid for lvalues (but not rvalues) of reference_wrapper specializations.

This patch fixes this by limiting above optimization only to situations,
when argument is not specialization of reference_wrapper. This is achieved
bu comparing __inv_unwrap&lt;_Td&gt;::type with _Td. We use __inv_unwrap because
unwrap_reference_t does not handle cv-qualified types.

	PR libstdc++/121858

libstdc++-v3/ChangeLog:

	* include/bits/funcref_impl.h
	(function_ref::function_ref(nontype&lt;__fn&gt;, _Up&amp;&amp;)): Handle.
	reference_wrapper.
	* testsuite/20_util/function_ref/call.cc: Call and update
	test05(). Add new test06() for reference_wrapper.

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++: Tweak static_assert messages for volatile atomic waits</title>
<updated>2025-11-15T21:45:44+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-11-15T10:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=85066ad6c301390fbab2805307a6cc61aef22c21'/>
<id>85066ad6c301390fbab2805307a6cc61aef22c21</id>
<content type='text'>
libstdc++-v3/ChangeLog:

	* include/bits/atomic_base.h: Tweak grammar of static assert
	messages for unsupported atomic wait on volatile.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libstdc++-v3/ChangeLog:

	* include/bits/atomic_base.h: Tweak grammar of static assert
	messages for unsupported atomic wait on volatile.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Ensure that _Utf_view is always a view.</title>
<updated>2025-11-14T17:27:01+00:00</updated>
<author>
<name>Tomasz Kamiński</name>
<email>tkaminsk@redhat.com</email>
</author>
<published>2025-11-14T16:43:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=f94a73e0fcedf7a05b04aa12beee57b9a82859a5'/>
<id>f94a73e0fcedf7a05b04aa12beee57b9a82859a5</id>
<content type='text'>
Previously, _Utf_view accepted any input_range, including reference-to-array
types like char(&amp;)[2], and stored it as the _M_base member. In such cases,
_Utf_view was not assignable, failing the requirements of view concept.

This patch addresses the issue by adding the ranges::view constraint to the
second template parameter of _Utf_view, and for clarity renaming it from
_Range to _View. The constructor is also adjusted to accept its argument
by value (views must be O(1) move-constructible). This prevents implicitly
generated CTAD from deducing a reference type.

This makes _Utf_view consistent with both other standard views and the
wording from P2728R8: Unicode in the Library, Part 1: UTF Transcoding [1].

The explicit CTAD from viewable_range is not defined for _Utf_view because
it depends on views::all_t, views::ref_view, and views::owning_view,
which are declared in &lt;ranges&gt;. Consequently, users must explicitly cast
the argument to a view or specify it as a template parameter.

[1] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2728r8.html

libstdc++-v3/ChangeLog:

	* include/bits/unicode.h (_Utf_view): Rename the template parameter
	from _Range to _View and constrain it with ranges::view.
	(_Utf_view::_Utf_view): Accept by value instead of rvalue reference.
	* include/std/format (__format::__write_padded): Replace _Utf_view
	over const char32_t(&amp;)[1] with span&lt;const char32_t, 1&gt;.
	* testsuite/ext/unicode/view.cc: Add checks if specialization
	of _Utf_view satisfy view. Wrap arrays into std::span before
	constructing _Utf_view.

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>
Previously, _Utf_view accepted any input_range, including reference-to-array
types like char(&amp;)[2], and stored it as the _M_base member. In such cases,
_Utf_view was not assignable, failing the requirements of view concept.

This patch addresses the issue by adding the ranges::view constraint to the
second template parameter of _Utf_view, and for clarity renaming it from
_Range to _View. The constructor is also adjusted to accept its argument
by value (views must be O(1) move-constructible). This prevents implicitly
generated CTAD from deducing a reference type.

This makes _Utf_view consistent with both other standard views and the
wording from P2728R8: Unicode in the Library, Part 1: UTF Transcoding [1].

The explicit CTAD from viewable_range is not defined for _Utf_view because
it depends on views::all_t, views::ref_view, and views::owning_view,
which are declared in &lt;ranges&gt;. Consequently, users must explicitly cast
the argument to a view or specify it as a template parameter.

[1] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2728r8.html

libstdc++-v3/ChangeLog:

	* include/bits/unicode.h (_Utf_view): Rename the template parameter
	from _Range to _View and constrain it with ranges::view.
	(_Utf_view::_Utf_view): Accept by value instead of rvalue reference.
	* include/std/format (__format::__write_padded): Replace _Utf_view
	over const char32_t(&amp;)[1] with span&lt;const char32_t, 1&gt;.
	* testsuite/ext/unicode/view.cc: Add checks if specialization
	of _Utf_view satisfy view. Wrap arrays into std::span before
	constructing _Utf_view.

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++: Fix std::forward_list::assign assignable check [PR122661]</title>
<updated>2025-11-13T14:29:15+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-11-13T09:45:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=9332dfd4523ddb100668a7c11a144a2bd676da7e'/>
<id>9332dfd4523ddb100668a7c11a144a2bd676da7e</id>
<content type='text'>
The std::is_assignable check should test for assignment to an lvalue,
not an rvalue.

libstdc++-v3/ChangeLog:

	PR libstdc++/122661
	* include/bits/forward_list.h (forward_list::assign(I, I)): Fix
	value category in is_assignable check.
	* testsuite/23_containers/forward_list/modifiers/122661.cc:
	New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The std::is_assignable check should test for assignment to an lvalue,
not an rvalue.

libstdc++-v3/ChangeLog:

	PR libstdc++/122661
	* include/bits/forward_list.h (forward_list::assign(I, I)): Fix
	value category in is_assignable check.
	* testsuite/23_containers/forward_list/modifiers/122661.cc:
	New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: add ADL friends</title>
<updated>2025-11-03T18:32:25+00:00</updated>
<author>
<name>Jason Merrill</name>
<email>jason@redhat.com</email>
</author>
<published>2025-11-01T13:07:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=5926cc99ae18eb9cc5d0081c4b0e90f87c7d31e6'/>
<id>5926cc99ae18eb9cc5d0081c4b0e90f87c7d31e6</id>
<content type='text'>
Since the implementation namespaces __detail and __exception_ptr aren't
exported from std, ADL can't find these functions there.  Adding friend
declarations makes it work.

libstdc++-v3/ChangeLog:

	* include/bits/quoted_string.h: Add ADL friends.
	* libsupc++/exception_ptr.h: Add ADL friend.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the implementation namespaces __detail and __exception_ptr aren't
exported from std, ADL can't find these functions there.  Adding friend
declarations makes it work.

libstdc++-v3/ChangeLog:

	* include/bits/quoted_string.h: Add ADL friends.
	* libsupc++/exception_ptr.h: Add ADL friend.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: add attributes to more ios_base types</title>
<updated>2025-11-03T15:55:06+00:00</updated>
<author>
<name>Jason Merrill</name>
<email>jason@redhat.com</email>
</author>
<published>2025-11-03T15:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=725ce34b6c27a1d840a03911644f4d248858c83d'/>
<id>725ce34b6c27a1d840a03911644f4d248858c83d</id>
<content type='text'>
In r15-3499 I added attributes to _Ios_Openmode to avoid -Wswitch false
positives; let's do the same for the other enums in ios_base.

It also seems to me that with these attributes, the tests don't need to
include the end/max/min cases.

libstdc++-v3/ChangeLog:

	* include/bits/ios_base.h: Add attribs to _Ios_Fmtflags,
	_Ios_Iostate, _ios_seekdir.
	* testsuite/27_io/ios_base/types/fmtflags/case_label.cc: Remove
	unneeded cases.
	* testsuite/27_io/ios_base/types/iostate/case_label.cc: Likewise.
	* testsuite/27_io/ios_base/types/openmode/case_label.cc: Likewise.
	* testsuite/27_io/ios_base/types/seekdir/case_label.cc: Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In r15-3499 I added attributes to _Ios_Openmode to avoid -Wswitch false
positives; let's do the same for the other enums in ios_base.

It also seems to me that with these attributes, the tests don't need to
include the end/max/min cases.

libstdc++-v3/ChangeLog:

	* include/bits/ios_base.h: Add attribs to _Ios_Fmtflags,
	_Ios_Iostate, _ios_seekdir.
	* testsuite/27_io/ios_base/types/fmtflags/case_label.cc: Remove
	unneeded cases.
	* testsuite/27_io/ios_base/types/iostate/case_label.cc: Likewise.
	* testsuite/27_io/ios_base/types/openmode/case_label.cc: Likewise.
	* testsuite/27_io/ios_base/types/seekdir/case_label.cc: Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstd++: Implement C++23 P2674R1 - A trait for implicit lifetime types</title>
<updated>2025-10-30T07:46:26+00:00</updated>
<author>
<name>Jakub Jelinek</name>
<email>jakub@redhat.com</email>
</author>
<published>2025-10-30T07:43:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=acdf675933d549f2fe2c89e4feabcf36e382b4f5'/>
<id>acdf675933d549f2fe2c89e4feabcf36e382b4f5</id>
<content type='text'>
The following patch attempts to implement the library side of the
C++23 P2674R1 paper.  As mentioned in the paper, since CWG2605
the trait isn't really implementable purely on the library side.

The compiler side has been committed earlier, so this just uses
the new builtin trait on the library side.

2025-10-30  Jakub Jelinek  &lt;jakub@redhat.com&gt;

	* include/bits/version.def (is_implicit_lifetime): New.
	* include/bits/version.h: Regenerate.
	* include/std/type_traits (std::is_implicit_lifetime,
	std::is_implicit_lifetime_v): New trait.
	* src/c++23/std.cc.in (std::is_implicit_lifetime,
	std::is_implicit_lifetime_v): Export.
	* testsuite/20_util/is_implicit_lifetime/version.cc: New test.
	* testsuite/20_util/is_implicit_lifetime/value.cc: New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following patch attempts to implement the library side of the
C++23 P2674R1 paper.  As mentioned in the paper, since CWG2605
the trait isn't really implementable purely on the library side.

The compiler side has been committed earlier, so this just uses
the new builtin trait on the library side.

2025-10-30  Jakub Jelinek  &lt;jakub@redhat.com&gt;

	* include/bits/version.def (is_implicit_lifetime): New.
	* include/bits/version.h: Regenerate.
	* include/std/type_traits (std::is_implicit_lifetime,
	std::is_implicit_lifetime_v): New trait.
	* src/c++23/std.cc.in (std::is_implicit_lifetime,
	std::is_implicit_lifetime_v): Export.
	* testsuite/20_util/is_implicit_lifetime/version.cc: New test.
	* testsuite/20_util/is_implicit_lifetime/value.cc: New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Fix -Wunused-variable from &lt;regex&gt;</title>
<updated>2025-10-29T21:41:12+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-10-29T21:37:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=cc78f8523832d693f9e1dd2f48964e27fb90b947'/>
<id>cc78f8523832d693f9e1dd2f48964e27fb90b947</id>
<content type='text'>
In r16-4709-gc55c1de3a9adb2 I meant to use the result of the
static_cast&lt;char&gt; for the rest of the function following it, but I
accidentally used the original variable __ch. This causes
-Wunused-variable warnings for the __c initialized from the cast.

This fixes the rest of the function to use __c instead of __ch.

libstdc++-v3/ChangeLog:

	* include/bits/regex.tcc (regex_traits::value): Use __c instead
	of __ch.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In r16-4709-gc55c1de3a9adb2 I meant to use the result of the
static_cast&lt;char&gt; for the rest of the function following it, but I
accidentally used the original variable __ch. This causes
-Wunused-variable warnings for the __c initialized from the cast.

This fixes the rest of the function to use __c instead of __ch.

libstdc++-v3/ChangeLog:

	* include/bits/regex.tcc (regex_traits::value): Use __c instead
	of __ch.
</pre>
</div>
</content>
</entry>
</feed>
