gcc/libstdc++-v3/include/std
Tomasz Kamiński ef29eabf55 libstdc++: Adjust enable_nonlocking_formatter_optimization specializations [PR121790]
This patch addresses several issues related to the additional specializations
for enable_nonlocking_formatter_optimization fomr P3235R3 proposal:

* LWG4399 [1]: Apply remove_cvref_t to tuple and pair elements when checking if
	the direct printing optimization is enabled.
* LWG4398 [2]: Disable the direct printing optimization for the standard library
	 container adaptors: queue, priority_queue, and stack.
* LWG4400 [3]: Enable the direct printing optimization only for durations that
	 use standard arithmetic types. Conditionally enable it for hh_mm_ss
	 and time_points based on their underlying Duration template argument.

[1] https://cplusplus.github.io/LWG/issue4399
[2] https://cplusplus.github.io/LWG/issue4398
[3] https://cplusplus.github.io/LWG/issue4400

	PR libstdc++/121790

libstdc++-v3/ChangeLog:

	* include/bits/chrono_io.h (enable_nonlocking_formatter_optimization):
	Adjust specializations for duration, hh_mm_ss and time_points.
	* include/std/format (enable_nonlocking_formatter_optimization):
	Apply remove_cvref_t on pair and tuple elements.
	* include/std/queue (enable_nonlocking_formatter_optimization):
	Change specialization value to false.
	* include/std/stack (enable_nonlocking_formatter_optimization):
	Change specialization value to false.
	* testsuite/std/format/ranges/adaptors.cc: Adjusted tests.
	* testsuite/std/format/tuple.cc: Adjusted tests.
	* testsuite/std/time/format/nonlocking.cc: Adjusted tests.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
2025-10-10 09:23:01 +02:00
..
.editorconfig libstdc++: Add .editorconfig files 2024-09-16 10:10:23 +01:00
algorithm libstdc++: Implement C++23 P1659R3 starts_with and ends_with 2025-06-04 10:29:47 -04:00
any Update copyright years. 2025-01-02 11:59:57 +01:00
array libstdc++: Add comments to deleted std::swap overloads for LWG 2766 2025-07-14 21:41:37 +01:00
atomic libstdc++: Handle cv-qualified types in atomic and atomic_ref [PR115402] 2025-10-10 07:38:17 +02:00
barrier libstdc++: Create new base class of std::barrier<C> for non-dependent code 2025-05-30 10:02:29 +01:00
bit libstdc++: Use explicit cast to unsigned in std::rotr and std::rotl 2025-06-03 10:53:00 +01:00
bitset libstdc++: Constrain bitset(const CharT*) constructor [PR121046] 2025-08-28 14:00:48 +01:00
charconv libstdc++: Treat __int128 as a real integral type [PR96710] 2025-07-11 08:34:13 +01:00
chrono libstdc++: Restore C++20 <chrono> support for old std::string ABI 2025-09-03 10:49:06 +01:00
codecvt Update copyright years. 2025-01-02 11:59:57 +01:00
complex libstdc++: Remove implicit type conversions in std::complex 2025-08-28 14:00:48 +01:00
concepts libstdc++: Use consteval for _S_noexcept() helper functions 2025-09-11 14:38:59 +01:00
condition_variable Update copyright years. 2025-01-02 11:59:57 +01:00
coroutine Update copyright years. 2025-01-02 11:59:57 +01:00
debugging libstdc++: Implement C++26 <debugging> features [PR119670] 2025-08-28 17:47:00 +01:00
deque libstdc++: Simplify std::erase functions for sequence containers 2025-09-26 11:05:54 +01:00
execution Update copyright years. 2025-01-02 11:59:57 +01:00
expected libstdc++: Implement LWG4222 'expected' constructor from a single value missing a constraint 2025-09-03 19:12:15 +01:00
filesystem Update copyright years. 2025-01-02 11:59:57 +01:00
flat_map libstdc++: Fix flat_map::operator[] for const lvalue keys [PR120432] 2025-06-06 09:34:17 -04:00
flat_set libstdc++: Fix availability of std::erase_if(std::flat_foo) [PR119427] 2025-04-29 08:21:35 -04:00
format libstdc++: Adjust enable_nonlocking_formatter_optimization specializations [PR121790] 2025-10-10 09:23:01 +02:00
forward_list libstdc++: Define __cpp_lib_containers_ranges in appropriate headers [PR111055] 2025-04-11 13:56:03 +02:00
fstream Update copyright years. 2025-01-02 11:59:57 +01:00
functional libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744] 2025-09-19 17:31:31 -04:00
future libstdc++: Improve diagnostics for std::packaged_task invocable checks 2025-04-25 11:47:12 +01:00
generator libstdc++: Add lvalue overload for generator::yield_value 2025-04-24 22:22:33 +01:00
inplace_vector libstdc++: std::inplace_vector implementation cleaup 2025-09-30 21:59:16 +02:00
iomanip Update copyright years. 2025-01-02 11:59:57 +01:00
ios Update copyright years. 2025-01-02 11:59:57 +01:00
iosfwd Update copyright years. 2025-01-02 11:59:57 +01:00
iostream Update copyright years. 2025-01-02 11:59:57 +01:00
istream Update copyright years. 2025-01-02 11:59:57 +01:00
iterator Update copyright years. 2025-01-02 11:59:57 +01:00
latch libstdc++: Optimise std::latch::arrive_and_wait 2025-05-30 10:02:28 +01:00
limits libstdc++: Fix std::numeric_limits<__float128>::max_digits10 [PR121374] 2025-08-21 10:04:45 +01:00
list libstdc++: Define __cpp_lib_containers_ranges in appropriate headers [PR111055] 2025-04-11 13:56:03 +02:00
locale Update copyright years. 2025-01-02 11:59:57 +01:00
map libstdc++: Define __cpp_lib_containers_ranges in appropriate headers [PR111055] 2025-04-11 13:56:03 +02:00
mdspan libstdc++: Implement submdspan_mapping_result. [PR110352] 2025-10-08 12:39:44 +02:00
memory libstdc++: Move start_lifetime_as functions to bits/stl_construct.h [PR106658] 2025-09-22 15:59:21 +02:00
memory_resource Update copyright years. 2025-01-02 11:59:57 +01:00
mutex libstdc++: Check _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK with #if [PR121496] 2025-08-21 13:26:10 +01:00
numbers Update copyright years. 2025-01-02 11:59:57 +01:00
numeric libstdc++: Fix <numeric> parallel algos for move-only values [PR117905] 2025-05-06 17:19:26 +01:00
optional libstdc++: Add comments to deleted std::swap overloads for LWG 2766 2025-07-14 21:41:37 +01:00
ostream libstdc++: Implement P3107R5 optimizations for std::print [PR121790] 2025-10-10 09:00:22 +02:00
print libstdc++: Implement P3107R5 optimizations for std::print [PR121790] 2025-10-10 09:00:22 +02:00
queue libstdc++: Adjust enable_nonlocking_formatter_optimization specializations [PR121790] 2025-10-10 09:23:01 +02:00
random libstdc++: Implement Philox Engine (PR119794) 2025-09-23 16:38:29 +01:00
ranges libstdc++: Optimize determination of std::tuple_cat return type 2025-09-16 18:25:02 +01:00
ratio Update copyright years. 2025-01-02 11:59:57 +01:00
regex Update copyright years. 2025-01-02 11:59:57 +01:00
scoped_allocator Update copyright years. 2025-01-02 11:59:57 +01:00
semaphore libstdc++: Use std::conditional_t instead of lambda to select semaphore implementation 2025-06-06 20:15:07 +01:00
set libstdc++: Define __cpp_lib_containers_ranges in appropriate headers [PR111055] 2025-04-11 13:56:03 +02:00
shared_mutex libstdc++: Make std::unique_lock self-move-assignable 2025-03-06 16:46:19 +00:00
source_location Update copyright years. 2025-01-02 11:59:57 +01:00
span libstdc++: Apply LWG4351 to CTAD of span/mdspan. 2025-09-10 12:46:57 +02:00
spanstream libstdc++: Fix some -Wsign-compare warnings in headers 2025-09-27 21:18:42 +01:00
sstream libstdc++: Fix whitespace before comments in <sstream> 2025-06-11 10:30:10 +01:00
stack libstdc++: Adjust enable_nonlocking_formatter_optimization specializations [PR121790] 2025-10-10 09:23:01 +02:00
stacktrace libstdc++: Implement P3235R3 optimizations for std::print [PR121790] 2025-10-10 09:13:00 +02:00
stdexcept Update copyright years. 2025-01-02 11:59:57 +01:00
stdfloat Update copyright years. 2025-01-02 11:59:57 +01:00
stop_token libstdc++: Specialize _Never_valueless_alt for jthread, stop_token and stop_source 2025-08-26 15:21:41 +02:00
streambuf Update copyright years. 2025-01-02 11:59:57 +01:00
string libstdc++: Avoid _GLIBCXX20_CONSTEXPR in C++ >= 20 code sections 2025-10-01 21:52:44 +02:00
string_view Update copyright years. 2025-01-02 11:59:57 +01:00
syncstream libstdc++: Remove trailing whitespace in <syncstream> 2025-09-11 10:36:56 +01:00
system_error Update copyright years. 2025-01-02 11:59:57 +01:00
text_encoding libstdc++: Fix typos in iterator increment for std::text_encoding [PR117520] 2024-11-11 18:57:16 +00:00
thread libstdc++: Implement P3235R3 optimizations for std::print [PR121790] 2025-10-10 09:13:00 +02:00
tuple libstdc++: Optimize determination of std::tuple_cat return type 2025-09-16 18:25:02 +01:00
type_traits libstdc++: Rename _CwFixedValue::_S_type member 2025-09-09 14:26:15 +01:00
typeindex Update copyright years. 2025-01-02 11:59:57 +01:00
unordered_map libstdc++: Define __cpp_lib_containers_ranges in appropriate headers [PR111055] 2025-04-11 13:56:03 +02:00
unordered_set libstdc++: Define __cpp_lib_containers_ranges in appropriate headers [PR111055] 2025-04-11 13:56:03 +02:00
utility Add std::to_underlying to the set of stdlib functions that are always folded 2025-05-14 11:27:38 +03:00
valarray Update copyright years. 2025-01-02 11:59:57 +01:00
variant libstdc++: Add comments to deleted std::swap overloads for LWG 2766 2025-07-14 21:41:37 +01:00
vector libstdc++: Implement P3235R3 optimizations for std::print [PR121790] 2025-10-10 09:13:00 +02:00
version Update copyright years. 2025-01-02 11:59:57 +01:00