On 14/05/25 10:48 +0200, Tomasz Kamiński wrote:
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.
* include/Makefile.am: Likewise.
* include/Makefile.in: Likewise.
* include/std/functional: Likewise.
---
libstdc++-v3/doc/doxygen/stdheader.cc | 2 +-
libstdc++-v3/include/Makefile.am | 2 +-
libstdc++-v3/include/Makefile.in | 2 +-
.../include/bits/{move_only_function.h => funcwrap.h} | 8 ++++----
libstdc++-v3/include/std/functional | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
rename libstdc++-v3/include/bits/{move_only_function.h => funcwrap.h} (98%)
diff --git a/libstdc++-v3/doc/doxygen/stdheader.cc
b/libstdc++-v3/doc/doxygen/stdheader.cc
index 8a201334410..839bfc81bc0 100644
--- a/libstdc++-v3/doc/doxygen/stdheader.cc
+++ b/libstdc++-v3/doc/doxygen/stdheader.cc
@@ -55,7 +55,7 @@ void init_map()
headers["functional_hash.h"] = "functional";
headers["mofunc_impl.h"] = "functional";
headers["cpyfunc_impl.h"] = "functional";
- headers["move_only_function.h"] = "functional";
+ headers["funcwrap.h"] = "functional";
headers["invoke.h"] = "functional";
headers["ranges_cmp.h"] = "functional";
headers["refwrap.h"] = "functional";
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 5cc13381b02..3e5b6c4142e 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -205,6 +205,7 @@ bits_headers = \
${bits_srcdir}/fs_ops.h \
${bits_srcdir}/fs_path.h \
${bits_srcdir}/fstream.tcc \
+ ${bits_srcdir}/funcwrap.h \
${bits_srcdir}/gslice.h \
${bits_srcdir}/gslice_array.h \
${bits_srcdir}/hashtable.h \
@@ -224,7 +225,6 @@ bits_headers = \
${bits_srcdir}/mask_array.h \
${bits_srcdir}/memory_resource.h \
${bits_srcdir}/mofunc_impl.h \
- ${bits_srcdir}/move_only_function.h \
${bits_srcdir}/new_allocator.h \
${bits_srcdir}/node_handle.h \
${bits_srcdir}/ostream.tcc \
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index 6e5e97aa236..3531162b5f7 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -558,6 +558,7 @@ bits_freestanding = \
@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/fs_ops.h \
@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/fs_path.h \
@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/fstream.tcc \
+@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/funcwrap.h \
@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/gslice.h \
@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/gslice_array.h \
@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/hashtable.h \
@@ -577,7 +578,6 @@ bits_freestanding = \
@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/mask_array.h \
@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/memory_resource.h \
@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/mofunc_impl.h \
-@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/move_only_function.h \
@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/new_allocator.h \
@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/node_handle.h \
@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/ostream.tcc \
diff --git a/libstdc++-v3/include/bits/move_only_function.h
b/libstdc++-v3/include/bits/funcwrap.h
similarity index 98%
rename from libstdc++-v3/include/bits/move_only_function.h
rename to libstdc++-v3/include/bits/funcwrap.h
index ecaded79d37..aa4b962c234 100644
--- a/libstdc++-v3/include/bits/move_only_function.h
+++ b/libstdc++-v3/include/bits/funcwrap.h
@@ -22,13 +22,13 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
-/** @file include/bits/move_only_function.h
+/** @file include/bits/funcwrap.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{functional}
*/
-#ifndef _GLIBCXX_MOVE_ONLY_FUNCTION_H
-#define _GLIBCXX_MOVE_ONLY_FUNCTION_H 1
+#ifndef _GLIBCXX_FUNCWRAP_H
+#define _GLIBCXX_FUNCWRAP_H 1
#ifdef _GLIBCXX_SYSHDR
#pragma GCC system_header
@@ -504,4 +504,4 @@ _GLIBCXX_END_NAMESPACE_VERSION
#endif // __glibcxx_copyable_function
#endif // __cplusplus > 202002L && _GLIBCXX_HOSTED
-#endif // _GLIBCXX_MOVE_ONLY_FUNCTION_H
+#endif // _GLIBCXX_FUNCWRAP_H
diff --git a/libstdc++-v3/include/std/functional
b/libstdc++-v3/include/std/functional
index 46179998eeb..1f9c7df1891 100644
--- a/libstdc++-v3/include/std/functional
+++ b/libstdc++-v3/include/std/functional
@@ -73,7 +73,7 @@
# include <compare>
#endif
#if __cplusplus > 202002L && _GLIBCXX_HOSTED
Should this be
#if defined __glibcxx_move_only_function || defined __glibcxx_copyable_function
?
That can be changed later if we want to, this is OK for trunk.
Thanks!
-# include <bits/move_only_function.h>
+# include <bits/funcwrap.h>
#endif
#define __glibcxx_want_boyer_moore_searcher
--
2.49.0