gcc/libstdc++-v3/include
Jonathan Wakely c4baeaecbb libstdc++: Implement C++26 native handles for file streams (P1759R6)
The new __basic_file::native_handle() function can be added for C++11
and above, because the names "native_handle" and "native_handle_type"
are already reserved since C++11. Exporting those symbols from the
shared library does no harm, even if the feature gets dropped before the
C++23 standard is final.

The new member functions of std::fstream etc. are only declared for
C++26 and so are not instantiated in src/c++11/fstream-inst.cc. Declare
them with the always_inline attribute so that no symbol definitions are
needed in the library (we can change this later when C++26 support is
less experimental).

libstdc++-v3/ChangeLog:

	* acinclude.m4 (GLIBCXX_CHECK_FILEBUF_NATIVE_HANDLES): New
	macro.
	* config.h.in: Regenerate.
	* config/abi/pre/gnu.ver (GLIBCXX_3.4.32): Export new
	basic_filebuf members.
	* config/io/basic_file_stdio.cc (__basic_file::native_handle):
	Define new function.
	* config/io/basic_file_stdio.h (__basic_file::native_handle):
	Declare new function.
	* configure: Regenerate.
	* configure.ac: Use GLIBCXX_CHECK_FILEBUF_NATIVE_HANDLES.
	* include/bits/version.def (fstream_native_handles): New macro.
	* include/bits/version.h: Regenerate.
	* include/std/fstream (basic_filebuf::native_handle)
	(basic_fstream::native_handle, basic_ifstream::native_handle)
	(basic_ofstream::native_handle): New functions.
	* src/c++11/Makefile.am: Move compilation of basic_file.cc,
	locale_init.cc and localename.cc to here.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++98/locale_init.cc: Moved to...
	* src/c++11/locale_init.cc: ...here.
	* src/c++98/localename.cc: Moved to...
	* src/c++11/localename.cc: ...here.
	* src/c++98/Makefile.am: Remove basic_file.cc, locale_init.cc
	and localename.cc from here.
	* src/c++98/Makefile.in: Regenerate.
	* testsuite/27_io/basic_filebuf/native_handle/version.cc: New test.
	* testsuite/27_io/basic_fstream/native_handle/char/1.cc: New test.
	* testsuite/27_io/basic_fstream/native_handle/wchar_t/1.cc: New test.
	* testsuite/27_io/basic_ifstream/native_handle/char/1.cc: New test.
	* testsuite/27_io/basic_ifstream/native_handle/wchar_t/1.cc: New test.
	* testsuite/27_io/basic_ofstream/native_handle/char/1.cc: New test.
	* testsuite/27_io/basic_ofstream/native_handle/wchar_t/1.cc: New test.
2023-09-15 21:57:41 +01:00
..
backward Update copyright years. 2023-01-16 11:52:17 +01:00
bits libstdc++: Implement C++26 native handles for file streams (P1759R6) 2023-09-15 21:57:41 +01:00
c Update copyright years. 2023-01-16 11:52:17 +01:00
c_compatibility libstdc++: Replace all manual FTM definitions and use 2023-08-16 15:16:25 +02:00
c_global libstdc++: Replace all manual FTM definitions and use 2023-08-16 15:16:25 +02:00
c_std Update copyright years. 2023-01-16 11:52:17 +01:00
debug libstdc++: Qualify calls to debug mode helpers 2023-06-26 17:43:22 +01:00
decimal Update copyright years. 2023-01-16 11:52:17 +01:00
experimental libstdc++: Remove some more unconditional uses of atomics 2023-09-14 13:58:34 +01:00
ext libstdc++: Stop using _GLIBCXX_USE_C99_MATH_TR1 in <cmath> 2023-05-31 21:01:16 +01:00
parallel libstdc++: Fix broken _GLIBCXX_PARALLEL mode 2023-06-02 11:44:14 +02:00
precompiled libstdc++: Fix some freestanding test failures 2023-04-05 18:45:15 +02:00
pstl libstdc++: Enable OpenMP 5.0 pragmas in PSTL headers 2023-07-04 00:05:53 +01:00
std libstdc++: Implement C++26 native handles for file streams (P1759R6) 2023-09-15 21:57:41 +01:00
tr1 Update copyright years. 2023-01-16 11:52:17 +01:00
tr2 Update copyright years. 2023-01-16 11:52:17 +01:00
Makefile.am libstdc++: Implement more maintainable <version> header 2023-08-16 15:16:25 +02:00
Makefile.in libstdc++: Regenerate Makefile.in 2023-08-17 13:12:39 +01:00