<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gcc.git/libstdc++-v3/include/Makefile.am, 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++: Remove unwanted STDC_HEADERS macro from c++config.h [PR79147]</title>
<updated>2025-09-25T13:51:50+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-09-19T11:11:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=0959f0e0cee6ecff4242cf2f1e5c8db29b09904b'/>
<id>0959f0e0cee6ecff4242cf2f1e5c8db29b09904b</id>
<content type='text'>
Similar to r16-4034-g1953939243e1ab, this comments out another macro
that Autoconf adds to the generated config.h but which is not wanted in
the c++config.h file that we install.

There's no benefit to defining _GLIBCXX_STDC_HEADERS in user code, so we
should just prevent it from being defined.

libstdc++-v3/ChangeLog:

	PR libstdc++/79147
	PR libstdc++/103650
	* include/Makefile.am (c++config.h): Adjust sed command to
	comment out STDC_HEADERS macro.
	* include/Makefile.in: Regenerate.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to r16-4034-g1953939243e1ab, this comments out another macro
that Autoconf adds to the generated config.h but which is not wanted in
the c++config.h file that we install.

There's no benefit to defining _GLIBCXX_STDC_HEADERS in user code, so we
should just prevent it from being defined.

libstdc++-v3/ChangeLog:

	PR libstdc++/79147
	PR libstdc++/103650
	* include/Makefile.am (c++config.h): Adjust sed command to
	comment out STDC_HEADERS macro.
	* include/Makefile.in: Regenerate.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Remove unwanted PACKAGE macros from c++config.h [PR79147]</title>
<updated>2025-09-23T09:17:09+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-09-19T11:11:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=1953939243e1ab8c839c1bcb2a072d1e84627afe'/>
<id>1953939243e1ab8c839c1bcb2a072d1e84627afe</id>
<content type='text'>
Autoconf insists on adding macros like PACKAGE_NAME and
PACKAGE_BUG_TARNAME to config.h but those are useless for libstdc++
because it's not a complete package, just a sub-directory of gcc, and we
never use any of those strings in our sources.

Since we include the generated config.h in our installed c++config.h
header, those useless macros are exposed to users. We do transform them
to use the reserved _GLIBCXX_ prefix, but they're still just useless
noise in the installed header.

I don't know any way to get autoconf to not add them to config.h but
this change comments them out so they're not defined when users include
our headers.

Although not really important now that the macro isn't being defined,
this change also avoids the double substitution for PACKAGE_VERSION
which was resulting in _GLIBCXX_PACKAGE__GLIBCXX_VERSION.

libstdc++-v3/ChangeLog:

	PR libstdc++/79147
	* include/Makefile.am (c++config.h): Adjust sed command to
	comment out all PACKAGE_XXX macros and to avoid adjusting
	PACKAGE_VERSION twice.
	* include/Makefile.in: Regenerate.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Autoconf insists on adding macros like PACKAGE_NAME and
PACKAGE_BUG_TARNAME to config.h but those are useless for libstdc++
because it's not a complete package, just a sub-directory of gcc, and we
never use any of those strings in our sources.

Since we include the generated config.h in our installed c++config.h
header, those useless macros are exposed to users. We do transform them
to use the reserved _GLIBCXX_ prefix, but they're still just useless
noise in the installed header.

I don't know any way to get autoconf to not add them to config.h but
this change comments them out so they're not defined when users include
our headers.

Although not really important now that the macro isn't being defined,
this change also avoids the double substitution for PACKAGE_VERSION
which was resulting in _GLIBCXX_PACKAGE__GLIBCXX_VERSION.

libstdc++-v3/ChangeLog:

	PR libstdc++/79147
	* include/Makefile.am (c++config.h): Adjust sed command to
	comment out all PACKAGE_XXX macros and to avoid adjusting
	PACKAGE_VERSION twice.
	* include/Makefile.in: Regenerate.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Move _Binder and related aliases to separate file.</title>
<updated>2025-09-04T13:29:36+00:00</updated>
<author>
<name>Tomasz Kamiński</name>
<email>tkaminsk@redhat.com</email>
</author>
<published>2025-09-01T12:28:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=b2adb7712cc57920d7d791c185dbf88e83b885c2'/>
<id>b2adb7712cc57920d7d791c185dbf88e83b885c2</id>
<content type='text'>
bits/binders.h is already mapped in libstdc++-v3/doc/doxygen/stdheader.cc.

libstdc++-v3/ChangeLog:

	* include/Makefile.am: Add bits/binders.h
	* include/Makefile.in: Add bits/binders.h
	* include/std/functional (std::_Indexed_bound_arg, std::_Binder)
	(std::__make_bound_args, std::_Bind_front_t, std::_Bind_back_t):
	Moved to bits/binders.h file, that is now included.
	* include/bits/binders.h: New file.

Reviewed-by: Patrick Palka &lt;ppalka@redhat.com&gt;
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>
bits/binders.h is already mapped in libstdc++-v3/doc/doxygen/stdheader.cc.

libstdc++-v3/ChangeLog:

	* include/Makefile.am: Add bits/binders.h
	* include/Makefile.in: Add bits/binders.h
	* include/std/functional (std::_Indexed_bound_arg, std::_Binder)
	(std::__make_bound_args, std::_Bind_front_t, std::_Bind_back_t):
	Moved to bits/binders.h file, that is now included.
	* include/bits/binders.h: New file.

Reviewed-by: Patrick Palka &lt;ppalka@redhat.com&gt;
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++: Implement C++26 &lt;debugging&gt; features [PR119670]</title>
<updated>2025-08-28T16:47:00+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-04-10T16:50:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=3c95766e92d6782eb945593c043a16be096707af'/>
<id>3c95766e92d6782eb945593c043a16be096707af</id>
<content type='text'>
This implements P2546R5 (Debugging Support), including the P2810R4
(is_debugger_present is_replaceable) changes, allowing
std::is_debugger_present to be replaced by the program.

It would be good to provide a macOS definition of is_debugger_present as
per https://developer.apple.com/library/archive/qa/qa1361/_index.html
but that isn't included in this change.

The src/c++26/debugging.cc file defines a global volatile int which can
be set by debuggers to indicate when they are attached and detached from
a running process. This allows std::is_debugger_present() to give a
reliable answer, and additionally allows a debugger to choose how
std::breakpoint() should behave. Setting the global to a positive value
will cause std::breakpoint() to use that value as an argument to
std::raise, so debuggers that prefer SIGABRT for breakpoints can select
that. By default std::breakpoint() will use a platform-specific action
such as the INT3 instruction on x86, or GCC's __builtin_trap().

On Linux the std::is_debugger_present() function checks whether the
process is being traced by a process named "gdb", "gdbserver" or
"lldb-server", to try to avoid interpreting other tracing processes
(such as strace) as a debugger. There have been comments suggesting this
isn't desirable and that std::is_debugger_present() should just return
true for any tracing process (which is the case for non-Linux targets
that support the ptrace system call).

libstdc++-v3/ChangeLog:

	PR libstdc++/119670
	* acinclude.m4 (GLIBCXX_CHECK_DEBUGGING): Check for facilities
	needed by &lt;debugging&gt;.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Use GLIBCXX_CHECK_DEBUGGING.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/bits/version.def (debugging): Add.
	* include/bits/version.h: Regenerate.
	* include/precompiled/stdc++.h: Add new header.
	* src/c++26/Makefile.am: Add new file.
	* src/c++26/Makefile.in: Regenerate.
	* include/std/debugging: New file.
	* src/c++26/debugging.cc: New file.
	* testsuite/19_diagnostics/debugging/breakpoint.cc: New test.
	* testsuite/19_diagnostics/debugging/breakpoint_if_debugging.cc:
	New test.
	* testsuite/19_diagnostics/debugging/is_debugger_present.cc: New
	test.
	* testsuite/19_diagnostics/debugging/is_debugger_present-2.cc:
	New test.

Reviewed-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implements P2546R5 (Debugging Support), including the P2810R4
(is_debugger_present is_replaceable) changes, allowing
std::is_debugger_present to be replaced by the program.

It would be good to provide a macOS definition of is_debugger_present as
per https://developer.apple.com/library/archive/qa/qa1361/_index.html
but that isn't included in this change.

The src/c++26/debugging.cc file defines a global volatile int which can
be set by debuggers to indicate when they are attached and detached from
a running process. This allows std::is_debugger_present() to give a
reliable answer, and additionally allows a debugger to choose how
std::breakpoint() should behave. Setting the global to a positive value
will cause std::breakpoint() to use that value as an argument to
std::raise, so debuggers that prefer SIGABRT for breakpoints can select
that. By default std::breakpoint() will use a platform-specific action
such as the INT3 instruction on x86, or GCC's __builtin_trap().

On Linux the std::is_debugger_present() function checks whether the
process is being traced by a process named "gdb", "gdbserver" or
"lldb-server", to try to avoid interpreting other tracing processes
(such as strace) as a debugger. There have been comments suggesting this
isn't desirable and that std::is_debugger_present() should just return
true for any tracing process (which is the case for non-Linux targets
that support the ptrace system call).

libstdc++-v3/ChangeLog:

	PR libstdc++/119670
	* acinclude.m4 (GLIBCXX_CHECK_DEBUGGING): Check for facilities
	needed by &lt;debugging&gt;.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Use GLIBCXX_CHECK_DEBUGGING.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/bits/version.def (debugging): Add.
	* include/bits/version.h: Regenerate.
	* include/precompiled/stdc++.h: Add new header.
	* src/c++26/Makefile.am: Add new file.
	* src/c++26/Makefile.in: Regenerate.
	* include/std/debugging: New file.
	* src/c++26/debugging.cc: New file.
	* testsuite/19_diagnostics/debugging/breakpoint.cc: New test.
	* testsuite/19_diagnostics/debugging/breakpoint_if_debugging.cc:
	New test.
	* testsuite/19_diagnostics/debugging/is_debugger_present.cc: New
	test.
	* testsuite/19_diagnostics/debugging/is_debugger_present-2.cc:
	New test.

Reviewed-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Add std::inplace_vector for C++26 (P0843R14) [PR119137]</title>
<updated>2025-07-18T07:49:34+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2025-06-05T11:05:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=9e3309773855d3639fdb9a7a7f7176612f16cd28'/>
<id>9e3309773855d3639fdb9a7a7f7176612f16cd28</id>
<content type='text'>
Implement std::inplace_vector as specified in P0843R14, without follow
up papers, in particular P3074R7 (trivial unions). In consequence
inplace_vector&lt;T, N&gt; can be used inside constant evaluations only
if T is trivial or N is equal to zero.

We provide a separate specialization for inplace_vector&lt;T, 0&gt; to meet
the requirements of N5008 [inplace.vector.overview] p5. In particular
objects of such types needs to be empty.

To allow constexpr variable of inplace_vector v, where v.size() &lt; v.capacity(),
we need to guaranteed that all elements of the storage array are initialized,
even ones in range [v.data() + v.size(), v.data() + v.capacity()). This is
perfoirmed by _M_init function, that is called by each constructor. By storing
the array in anonymous union, we can perform this initialization in constant
evaluation, avoiding the impact on runtime path.

The size() function conveys the information that _M_size &lt;= _Nm to compiler,
by calling __builtin_unreachable(). In particular this allows us to eliminate
FP warnings by using _Nm - size() instead of _Nm - _M_size, when computing
available elements.

The included test cover almost all code paths at runtime, however some
compile time evaluation test are not yet implemented:
* operations on range, they depend on making testsuite_iterators constexpr
* negative test for invoking operations with preconditions at compile time,
  especially for zero size specialization.

	PR libstdc++/119137

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (INPUT): Add new header.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/bits/stl_iterator_base_types.h (__any_input_iterator):
	Define.
	* include/bits/version.def (inplace_vector): Define.
	* include/bits/version.h: Regenerate.
	* include/precompiled/stdc++.h: Include new header.
	* src/c++23/std.cc.in: Export contents if new header.
	* include/std/inplace_vector: New file.
	* testsuite/23_containers/inplace_vector/access/capacity.cc: New file.
	* testsuite/23_containers/inplace_vector/access/elem.cc: New file.
	* testsuite/23_containers/inplace_vector/access/elem_neg.cc: New file.
	* testsuite/23_containers/inplace_vector/cons/1.cc: New file.
	* testsuite/23_containers/inplace_vector/cons/from_range.cc: New file.
	* testsuite/23_containers/inplace_vector/cons/throws.cc: New file.
	* testsuite/23_containers/inplace_vector/copy.cc: New file.
	* testsuite/23_containers/inplace_vector/erasure.cc: New file.
	* testsuite/23_containers/inplace_vector/modifiers/assign.cc: New file.
	* testsuite/23_containers/inplace_vector/modifiers/erase.cc: New file.
	* testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc:
	New file.
	* testsuite/23_containers/inplace_vector/modifiers/single_insert.cc:
	New file.
	* testsuite/23_containers/inplace_vector/move.cc: New file.
	* testsuite/23_containers/inplace_vector/relops.cc: New file.
	* testsuite/23_containers/inplace_vector/version.cc: New file.
	* testsuite/util/testsuite_iterators.h (input_iterator_wrapper::base):
	Define.

Reviewed-by: Patrick Palka &lt;ppalka@redhat.com&gt;
Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Co-authored-by: Tomasz Kamiński &lt;tkaminsk@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>
Implement std::inplace_vector as specified in P0843R14, without follow
up papers, in particular P3074R7 (trivial unions). In consequence
inplace_vector&lt;T, N&gt; can be used inside constant evaluations only
if T is trivial or N is equal to zero.

We provide a separate specialization for inplace_vector&lt;T, 0&gt; to meet
the requirements of N5008 [inplace.vector.overview] p5. In particular
objects of such types needs to be empty.

To allow constexpr variable of inplace_vector v, where v.size() &lt; v.capacity(),
we need to guaranteed that all elements of the storage array are initialized,
even ones in range [v.data() + v.size(), v.data() + v.capacity()). This is
perfoirmed by _M_init function, that is called by each constructor. By storing
the array in anonymous union, we can perform this initialization in constant
evaluation, avoiding the impact on runtime path.

The size() function conveys the information that _M_size &lt;= _Nm to compiler,
by calling __builtin_unreachable(). In particular this allows us to eliminate
FP warnings by using _Nm - size() instead of _Nm - _M_size, when computing
available elements.

The included test cover almost all code paths at runtime, however some
compile time evaluation test are not yet implemented:
* operations on range, they depend on making testsuite_iterators constexpr
* negative test for invoking operations with preconditions at compile time,
  especially for zero size specialization.

	PR libstdc++/119137

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (INPUT): Add new header.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/bits/stl_iterator_base_types.h (__any_input_iterator):
	Define.
	* include/bits/version.def (inplace_vector): Define.
	* include/bits/version.h: Regenerate.
	* include/precompiled/stdc++.h: Include new header.
	* src/c++23/std.cc.in: Export contents if new header.
	* include/std/inplace_vector: New file.
	* testsuite/23_containers/inplace_vector/access/capacity.cc: New file.
	* testsuite/23_containers/inplace_vector/access/elem.cc: New file.
	* testsuite/23_containers/inplace_vector/access/elem_neg.cc: New file.
	* testsuite/23_containers/inplace_vector/cons/1.cc: New file.
	* testsuite/23_containers/inplace_vector/cons/from_range.cc: New file.
	* testsuite/23_containers/inplace_vector/cons/throws.cc: New file.
	* testsuite/23_containers/inplace_vector/copy.cc: New file.
	* testsuite/23_containers/inplace_vector/erasure.cc: New file.
	* testsuite/23_containers/inplace_vector/modifiers/assign.cc: New file.
	* testsuite/23_containers/inplace_vector/modifiers/erase.cc: New file.
	* testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc:
	New file.
	* testsuite/23_containers/inplace_vector/modifiers/single_insert.cc:
	New file.
	* testsuite/23_containers/inplace_vector/move.cc: New file.
	* testsuite/23_containers/inplace_vector/relops.cc: New file.
	* testsuite/23_containers/inplace_vector/version.cc: New file.
	* testsuite/util/testsuite_iterators.h (input_iterator_wrapper::base):
	Define.

Reviewed-by: Patrick Palka &lt;ppalka@redhat.com&gt;
Reviewed-by: Jonathan Wakely &lt;jwakely@redhat.com&gt;
Co-authored-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
Signed-off-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Implement C++26 std::indirect [PR119152]</title>
<updated>2025-05-26T10:25:32+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2024-03-21T23:07:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=caf804b1795575d7714c62dd45b649831598055e'/>
<id>caf804b1795575d7714c62dd45b649831598055e</id>
<content type='text'>
This patch implements C++26 std::indirect as specified
in P3019 with amendment to move assignment from LWG 4251.

	PR libstdc++/119152

libstdc++-v3/ChangeLog:

	* doc/doxygen/stdheader.cc: Added indirect.h file.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/bits/indirect.h: New file.
	* include/bits/version.def (indirect): Define.
	* include/bits/version.h: Regenerate.
	* include/std/memory: Include new header.
	* testsuite/std/memory/indirect/copy.cc
	* testsuite/std/memory/indirect/copy_alloc.cc
	* testsuite/std/memory/indirect/ctor.cc
	* testsuite/std/memory/indirect/incomplete.cc
	* testsuite/std/memory/indirect/invalid_neg.cc
	* testsuite/std/memory/indirect/move.cc
	* testsuite/std/memory/indirect/move_alloc.cc
	* testsuite/std/memory/indirect/relops.cc

Co-authored-by: Tomasz Kamiński &lt;tkaminsk@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 C++26 std::indirect as specified
in P3019 with amendment to move assignment from LWG 4251.

	PR libstdc++/119152

libstdc++-v3/ChangeLog:

	* doc/doxygen/stdheader.cc: Added indirect.h file.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/bits/indirect.h: New file.
	* include/bits/version.def (indirect): Define.
	* include/bits/version.h: Regenerate.
	* include/std/memory: Include new header.
	* testsuite/std/memory/indirect/copy.cc
	* testsuite/std/memory/indirect/copy_alloc.cc
	* testsuite/std/memory/indirect/ctor.cc
	* testsuite/std/memory/indirect/incomplete.cc
	* testsuite/std/memory/indirect/invalid_neg.cc
	* testsuite/std/memory/indirect/move.cc
	* testsuite/std/memory/indirect/move_alloc.cc
	* testsuite/std/memory/indirect/relops.cc

Co-authored-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
Signed-off-by: Tomasz Kamiński &lt;tkaminsk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Implement C++26 function_ref [PR119126]</title>
<updated>2025-05-26T09:25:28+00:00</updated>
<author>
<name>Tomasz Kamiński</name>
<email>tkaminsk@redhat.com</email>
</author>
<published>2025-05-14T10:04:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=545433e9bd32e965726956cb238d53b39844b85c'/>
<id>545433e9bd32e965726956cb238d53b39844b85c</id>
<content type='text'>
This patch implements C++26 function_ref as specified in P0792R14,
with correction for constraints for constructor accepting nontype_t
parameter from LWG 4256.

As function_ref may store a pointer to the const object, __Ptrs::_M_obj is
changed to const void*, so again we do not cast away const from const
objects. To help with necessary casts, a __polyfunc::__cast_to helper is
added, that accepts reference to or target type direclty.

The _Invoker now defines additional call methods used by function_ref:
_S_ptrs() for invoking target passed by reference, and __S_nttp, _S_bind_ptr,
_S_bind_ref for handling constructors accepting nontype_t. The existing
_S_call_storage is changed to thin wrapper, that initialies _Ptrs, and forwards
to _S_call_ptrs.

This reduced the most uses of _Storage::_M_ptr and _Storage::_M_ref,
so this functions was removed, and _Manager uses were adjusted.

Finally we make function_ref available in freestanding mode, as
move_only_function and copyable_function are currently only available in hosted,
so we define _Manager and _Mo_base only if either __glibcxx_move_only_function
or __glibcxx_copyable_function is defined.

	PR libstdc++/119126

libstdc++-v3/ChangeLog:

	* doc/doxygen/stdheader.cc: Added funcref_impl.h file.
	* include/Makefile.am: Added funcref_impl.h file.
	* include/Makefile.in: Added funcref_impl.h file.
	* include/bits/funcref_impl.h: New file.
	* include/bits/funcwrap.h: (_Ptrs::_M_obj): Const-qualify.
	(_Storage::_M_ptr, _Storage::_M_ref): Remove.
	(__polyfunc::__cast_to) Define.
	(_Base_invoker::_S_ptrs, _Base_invoker::_S_nttp)
	(_Base_invoker::_S_bind_ptrs, _Base_invoker::_S_bind_ref)
	(_Base_invoker::_S_call_ptrs): Define.
	(_Base_invoker::_S_call_storage): Foward to _S_call_ptrs.
	(_Manager::_S_local, _Manager::_S_ptr): Adjust for _M_obj being
	const qualified.
	(__polyfunc::_Manager, __polyfunc::_Mo_base): Guard with
	__glibcxx_move_only_function || __glibcxx_copyable_function.
	(__polyfunc::__skip_first_arg, __polyfunc::__deduce_funcref)
	(std::function_ref) [__glibcxx_function_ref]: Define.
	* include/bits/utility.h (std::nontype_t, std::nontype)
	(__is_nontype_v) [__glibcxx_function_ref]: Define.
	* include/bits/version.def: Define function_ref.
	* include/bits/version.h: Regenerate.
	* include/std/functional: Define __cpp_lib_function_ref.
	* src/c++23/std.cc.in (std::nontype_t, std::nontype)
	(std::function_ref) [__cpp_lib_function_ref]: Export.
	* testsuite/20_util/function_ref/assign.cc: New test.
	* testsuite/20_util/function_ref/call.cc: New test.
	* testsuite/20_util/function_ref/cons.cc: New test.
	* testsuite/20_util/function_ref/cons_neg.cc: New test.
	* testsuite/20_util/function_ref/conv.cc: New test.
	* testsuite/20_util/function_ref/deduction.cc: New test.
	* testsuite/20_util/function_ref/mutation.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 patch implements C++26 function_ref as specified in P0792R14,
with correction for constraints for constructor accepting nontype_t
parameter from LWG 4256.

As function_ref may store a pointer to the const object, __Ptrs::_M_obj is
changed to const void*, so again we do not cast away const from const
objects. To help with necessary casts, a __polyfunc::__cast_to helper is
added, that accepts reference to or target type direclty.

The _Invoker now defines additional call methods used by function_ref:
_S_ptrs() for invoking target passed by reference, and __S_nttp, _S_bind_ptr,
_S_bind_ref for handling constructors accepting nontype_t. The existing
_S_call_storage is changed to thin wrapper, that initialies _Ptrs, and forwards
to _S_call_ptrs.

This reduced the most uses of _Storage::_M_ptr and _Storage::_M_ref,
so this functions was removed, and _Manager uses were adjusted.

Finally we make function_ref available in freestanding mode, as
move_only_function and copyable_function are currently only available in hosted,
so we define _Manager and _Mo_base only if either __glibcxx_move_only_function
or __glibcxx_copyable_function is defined.

	PR libstdc++/119126

libstdc++-v3/ChangeLog:

	* doc/doxygen/stdheader.cc: Added funcref_impl.h file.
	* include/Makefile.am: Added funcref_impl.h file.
	* include/Makefile.in: Added funcref_impl.h file.
	* include/bits/funcref_impl.h: New file.
	* include/bits/funcwrap.h: (_Ptrs::_M_obj): Const-qualify.
	(_Storage::_M_ptr, _Storage::_M_ref): Remove.
	(__polyfunc::__cast_to) Define.
	(_Base_invoker::_S_ptrs, _Base_invoker::_S_nttp)
	(_Base_invoker::_S_bind_ptrs, _Base_invoker::_S_bind_ref)
	(_Base_invoker::_S_call_ptrs): Define.
	(_Base_invoker::_S_call_storage): Foward to _S_call_ptrs.
	(_Manager::_S_local, _Manager::_S_ptr): Adjust for _M_obj being
	const qualified.
	(__polyfunc::_Manager, __polyfunc::_Mo_base): Guard with
	__glibcxx_move_only_function || __glibcxx_copyable_function.
	(__polyfunc::__skip_first_arg, __polyfunc::__deduce_funcref)
	(std::function_ref) [__glibcxx_function_ref]: Define.
	* include/bits/utility.h (std::nontype_t, std::nontype)
	(__is_nontype_v) [__glibcxx_function_ref]: Define.
	* include/bits/version.def: Define function_ref.
	* include/bits/version.h: Regenerate.
	* include/std/functional: Define __cpp_lib_function_ref.
	* src/c++23/std.cc.in (std::nontype_t, std::nontype)
	(std::function_ref) [__cpp_lib_function_ref]: Export.
	* testsuite/20_util/function_ref/assign.cc: New test.
	* testsuite/20_util/function_ref/call.cc: New test.
	* testsuite/20_util/function_ref/cons.cc: New test.
	* testsuite/20_util/function_ref/cons_neg.cc: New test.
	* testsuite/20_util/function_ref/conv.cc: New test.
	* testsuite/20_util/function_ref/deduction.cc: New test.
	* testsuite/20_util/function_ref/mutation.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>
<entry>
<title>libstdc++: Renamed bits/move_only_function.h to bits/funcwrap.h [PR119125]</title>
<updated>2025-05-14T13:00:41+00:00</updated>
<author>
<name>Tomasz Kamiński</name>
<email>tkaminsk@redhat.com</email>
</author>
<published>2025-05-12T09:06:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=d9055d010475fa1c624d6036881eee9c37034b21'/>
<id>d9055d010475fa1c624d6036881eee9c37034b21</id>
<content type='text'>
The file now includes copyable_function in addition to
move_only_function.

	PR libstdc++/119125

libstdc++-v3/ChangeLog:
	* include/bits/move_only_function.h: Move to...
	* include/bits/funcwrap.h: ...here.
	* doc/doxygen/stdheader.cc (init_map): Replaced move_only_function.h
	with funcwrap.h, and changed include guard to use feature test macro.
	Move bits/version.h include before others.
	* include/Makefile.am: Likewise.
	* include/Makefile.in: Likewise.
	* include/std/functional: Likewise.

Reviewed-by: Patrick Palka &lt;ppalka@redhat.com&gt;
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>
The file now includes copyable_function in addition to
move_only_function.

	PR libstdc++/119125

libstdc++-v3/ChangeLog:
	* include/bits/move_only_function.h: Move to...
	* include/bits/funcwrap.h: ...here.
	* doc/doxygen/stdheader.cc (init_map): Replaced move_only_function.h
	with funcwrap.h, and changed include guard to use feature test macro.
	Move bits/version.h include before others.
	* include/Makefile.am: Likewise.
	* include/Makefile.in: Likewise.
	* include/std/functional: Likewise.

Reviewed-by: Patrick Palka &lt;ppalka@redhat.com&gt;
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++: Implement C++26 copyable_function [PR119125]</title>
<updated>2025-05-14T12:00:47+00:00</updated>
<author>
<name>Tomasz Kamiński</name>
<email>tkaminsk@redhat.com</email>
</author>
<published>2025-05-12T08:01:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=0e93f7cd4ed0cf6bcfda90ed4dcad51a1f65b4b6'/>
<id>0e93f7cd4ed0cf6bcfda90ed4dcad51a1f65b4b6</id>
<content type='text'>
This patch implements C++26 copyable_function as specified in P2548R6.
It also implements LWG 4255 that adjust move_only_function so constructing
from empty copyable_function, produces empty functor. This falls from
existing checks, after specializing __is_polymorphic_function_v for
copyable_function specializations.

For compatible invoker signatures, the move_only_function may be constructed
from copyable_funciton without double indirection. To achieve that we derive
_Cpy_base from _Mo_base, and specialize __is_polymorphic_function_v for
copyable_function. Similary copyable_functions with compatible signatures
can be converted without double indirection.

As we starting to use _Op::_Copy operation from the _M_manage function,
invocations of that functions may now throw exceptions, so noexcept needs
to be removed from the signature of stored _M_manage pointers. This also
affects operations in _Mo_base, however we already wrap _M_manage invocations
in noexcept member functions (_M_move, _M_destroy, swap).

	PR libstdc++/119125

libstdc++-v3/ChangeLog:

	* doc/doxygen/stdheader.cc: Addded cpyfunc_impl.h header.
	* include/Makefile.am: Add bits cpyfunc_impl.h.
	* include/Makefile.in: Add bits cpyfunc_impl.h.
	* include/bits/cpyfunc_impl.h: New file.
	* include/bits/mofunc_impl.h: Mention LWG 4255.
	* include/bits/move_only_function.h: Update header description
	and change guard to also check __glibcxx_copyable_function.
	(_Manager::_Func): Remove noexcept.
	(std::__is_polymorphic_function_v&lt;move_only_function&lt;_Tp&gt;&gt;)
	(__variant::_Never_valueless_alt&lt;std::move_only_function&lt;_Signature...&gt;&gt;)
	(move_only_function) [__glibcxx_move_only_function]: Adjust guard.
	(std::__is_polymorphic_function_v&lt;copyable_function&lt;_Tp&gt;&gt;)
	(__variant::_Never_valueless_alt&lt;std::copyable_function&lt;_Signature...&gt;&gt;)
	(__polyfunc::_Cpy_base, std::copyable_function)
	[__glibcxx_copyable_function]: Define.
	* include/bits/version.def: Define copyable_function.
	* include/bits/version.h: Regenerate.
	* include/std/functional: Define __cpp_lib_copyable_function.
	* src/c++23/std.cc.in (copyable_function)
	[__cpp_lib_copyable_function]: Export.
	* testsuite/20_util/copyable_function/call.cc: New test based on
	move_only_function tests.
	* testsuite/20_util/copyable_function/cons.cc: New test based on
	move_only_function tests.
	* testsuite/20_util/copyable_function/conv.cc: New test based on
	move_only_function tests.
	* testsuite/20_util/copyable_function/copy.cc: New test.
	* testsuite/20_util/copyable_function/move.cc: New test based on
	move_only_function 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 C++26 copyable_function as specified in P2548R6.
It also implements LWG 4255 that adjust move_only_function so constructing
from empty copyable_function, produces empty functor. This falls from
existing checks, after specializing __is_polymorphic_function_v for
copyable_function specializations.

For compatible invoker signatures, the move_only_function may be constructed
from copyable_funciton without double indirection. To achieve that we derive
_Cpy_base from _Mo_base, and specialize __is_polymorphic_function_v for
copyable_function. Similary copyable_functions with compatible signatures
can be converted without double indirection.

As we starting to use _Op::_Copy operation from the _M_manage function,
invocations of that functions may now throw exceptions, so noexcept needs
to be removed from the signature of stored _M_manage pointers. This also
affects operations in _Mo_base, however we already wrap _M_manage invocations
in noexcept member functions (_M_move, _M_destroy, swap).

	PR libstdc++/119125

libstdc++-v3/ChangeLog:

	* doc/doxygen/stdheader.cc: Addded cpyfunc_impl.h header.
	* include/Makefile.am: Add bits cpyfunc_impl.h.
	* include/Makefile.in: Add bits cpyfunc_impl.h.
	* include/bits/cpyfunc_impl.h: New file.
	* include/bits/mofunc_impl.h: Mention LWG 4255.
	* include/bits/move_only_function.h: Update header description
	and change guard to also check __glibcxx_copyable_function.
	(_Manager::_Func): Remove noexcept.
	(std::__is_polymorphic_function_v&lt;move_only_function&lt;_Tp&gt;&gt;)
	(__variant::_Never_valueless_alt&lt;std::move_only_function&lt;_Signature...&gt;&gt;)
	(move_only_function) [__glibcxx_move_only_function]: Adjust guard.
	(std::__is_polymorphic_function_v&lt;copyable_function&lt;_Tp&gt;&gt;)
	(__variant::_Never_valueless_alt&lt;std::copyable_function&lt;_Signature...&gt;&gt;)
	(__polyfunc::_Cpy_base, std::copyable_function)
	[__glibcxx_copyable_function]: Define.
	* include/bits/version.def: Define copyable_function.
	* include/bits/version.h: Regenerate.
	* include/std/functional: Define __cpp_lib_copyable_function.
	* src/c++23/std.cc.in (copyable_function)
	[__cpp_lib_copyable_function]: Export.
	* testsuite/20_util/copyable_function/call.cc: New test based on
	move_only_function tests.
	* testsuite/20_util/copyable_function/cons.cc: New test based on
	move_only_function tests.
	* testsuite/20_util/copyable_function/conv.cc: New test based on
	move_only_function tests.
	* testsuite/20_util/copyable_function/copy.cc: New test.
	* testsuite/20_util/copyable_function/move.cc: New test based on
	move_only_function 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++: Add header mdspan to the build-system.</title>
<updated>2025-05-07T10:47:39+00:00</updated>
<author>
<name>Luc Grosheintz</name>
<email>luc.grosheintz@gmail.com</email>
</author>
<published>2025-04-29T12:46:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=4c9eef71db5e8e693c44ac4090247541e5a43063'/>
<id>4c9eef71db5e8e693c44ac4090247541e5a43063</id>
<content type='text'>
Creates a nearly empty header mdspan and adds it to the build-system and
Doxygen config file.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in: Add &lt;mdspan&gt;.
	* include/Makefile.am: Ditto.
	* include/Makefile.in: Ditto.
	* include/precompiled/stdc++.h: Ditto.
	* include/std/mdspan: New file.

Signed-off-by: Luc Grosheintz &lt;luc.grosheintz@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Creates a nearly empty header mdspan and adds it to the build-system and
Doxygen config file.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in: Add &lt;mdspan&gt;.
	* include/Makefile.am: Ditto.
	* include/Makefile.in: Ditto.
	* include/precompiled/stdc++.h: Ditto.
	* include/std/mdspan: New file.

Signed-off-by: Luc Grosheintz &lt;luc.grosheintz@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
