gcc/libstdc++-v3/include/bits
Jonathan Wakely d5e352addf libstdc++: Fix std::format for chrono::duration with unsigned rep [PR115668]
Using std::chrono::abs is only valid if numeric_limits<rep>::is_signed
is true, so using it unconditionally made it ill-formed to format a
duration with an unsigned rep.

The duration formatter might as well negate the duration itself instead
of using chrono::abs, because it already needs to check for a negative
value.

libstdc++-v3/ChangeLog:

	PR libstdc++/115668
	* include/bits/chrono_io.h (formatter<duration<R,P, C>::format):
	Do not use chrono::abs.
	* testsuite/20_util/duration/io.cc: Check formatting a duration
	with unsigned rep.

(cherry picked from commit dafa750c8a6f0a088677871bfaad054881737ab1)
2024-06-28 10:44:00 +01:00
..
algorithmfwd.h Update copyright years. 2024-01-03 12:19:35 +01:00
align.h Update copyright years. 2024-01-03 12:19:35 +01:00
alloc_traits.h libstdc++: Include <bits/stl_iterator.h> in <bits/alloc_traits.h> 2024-02-28 11:27:46 +00:00
allocated_ptr.h Update copyright years. 2024-01-03 12:19:35 +01:00
allocator.h libstdc++: Constrain std::vector default constructor [PR113841] 2024-03-22 22:39:06 +00:00
atomic_base.h libstdc++: Add missing clear_padding in __atomic_float constructor 2024-03-14 15:06:47 +00:00
atomic_futex.h Update copyright years. 2024-01-03 12:19:35 +01:00
atomic_timed_wait.h Update copyright years. 2024-01-03 12:19:35 +01:00
atomic_wait.h Update copyright years. 2024-01-03 12:19:35 +01:00
basic_ios.h Update copyright years. 2024-01-03 12:19:35 +01:00
basic_ios.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
basic_string.h libstdc++: Fix constexpr basic_string union member [PR113294] 2024-02-12 18:18:04 -05:00
basic_string.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
boost_concept_check.h Update copyright years. 2024-01-03 12:19:35 +01:00
c++0x_warning.h Update copyright years. 2024-01-03 12:19:35 +01:00
c++config libstdc++: Use _GLIBCXX_USE_BUILTIN_TRAIT for is_same 2024-02-09 10:11:47 -08:00
char_traits.h libstdc++: Fix std::char_traits<C>::move [PR113200] 2024-01-05 10:23:35 +00:00
charconv.h Update copyright years. 2024-01-03 12:19:35 +01:00
chrono.h libstdc++: Fix std::chrono::file_clock conversions for low-precision times 2024-01-21 22:15:06 +00:00
chrono_io.h libstdc++: Fix std::format for chrono::duration with unsigned rep [PR115668] 2024-06-28 10:44:00 +01:00
codecvt.h Update copyright years. 2024-01-03 12:19:35 +01:00
concept_check.h Update copyright years. 2024-01-03 12:19:35 +01:00
cow_string.h Update copyright years. 2024-01-03 12:19:35 +01:00
cpp_type_traits.h Update copyright years. 2024-01-03 12:19:35 +01:00
deque.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
elements_of.h Update copyright years. 2024-01-03 12:19:35 +01:00
enable_special_members.h Update copyright years. 2024-01-03 12:19:35 +01:00
erase_if.h Update copyright years. 2024-01-03 12:19:35 +01:00
forward_list.h Update copyright years. 2024-01-03 12:19:35 +01:00
forward_list.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
fs_dir.h Update copyright years. 2024-01-03 12:19:35 +01:00
fs_fwd.h libstdc++: Consistently use noexcept, constexpr, nodiscard on bitmask ops 2024-02-28 11:27:46 +00:00
fs_ops.h Update copyright years. 2024-01-03 12:19:35 +01:00
fs_path.h Update copyright years. 2024-01-03 12:19:35 +01:00
fstream.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
functexcept.h Update copyright years. 2024-01-03 12:19:35 +01:00
functional_hash.h Update copyright years. 2024-01-03 12:19:35 +01:00
gslice.h libstdc++: Add comment to gslice::operator=(const gslice&) [PR100147] 2024-02-08 21:32:42 +00:00
gslice_array.h Update copyright years. 2024-01-03 12:19:35 +01:00
hashtable.h libstdc++: Destroy allocators in re-inserted container nodes [PR114401] 2024-03-22 22:39:06 +00:00
hashtable_policy.h Update copyright years. 2024-01-03 12:19:35 +01:00
indirect_array.h Update copyright years. 2024-01-03 12:19:35 +01:00
invoke.h Update copyright years. 2024-01-03 12:19:35 +01:00
ios_base.h libstdc++: Consistently use noexcept, constexpr, nodiscard on bitmask ops 2024-02-28 11:27:46 +00:00
istream.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
iterator_concepts.h Update copyright years. 2024-01-03 12:19:35 +01:00
list.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
locale_classes.h libstdc++: Implement C++26 std::text_encoding (P1885R12) [PR113318] 2024-01-17 11:49:11 +00:00
locale_classes.tcc libstdc++: Use if-constexpr in std::__try_use_facet [PR113099] 2024-01-05 10:23:35 +00:00
locale_conv.h Update copyright years. 2024-01-03 12:19:35 +01:00
locale_facets.h Update copyright years. 2024-01-03 12:19:35 +01:00
locale_facets.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
locale_facets_nonio.h Update copyright years. 2024-01-03 12:19:35 +01:00
locale_facets_nonio.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
localefwd.h Update copyright years. 2024-01-03 12:19:35 +01:00
mask_array.h Update copyright years. 2024-01-03 12:19:35 +01:00
max_size_type.h Update copyright years. 2024-01-03 12:19:35 +01:00
memory_resource.h Update copyright years. 2024-01-03 12:19:35 +01:00
memoryfwd.h Update copyright years. 2024-01-03 12:19:35 +01:00
mofunc_impl.h
move.h libstdc++/ranges: Use C++23 deducing this in _Pipe and _Partial 2024-01-11 13:14:46 -05:00
move_only_function.h libstdc++: Only declare feature test macros in standard headers 2023-11-16 08:10:19 +00:00
new_allocator.h Update copyright years. 2024-01-03 12:19:35 +01:00
node_handle.h libstdc++: Destroy allocators in re-inserted container nodes [PR114401] 2024-03-22 22:39:06 +00:00
ostream.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
ostream_insert.h Update copyright years. 2024-01-03 12:19:35 +01:00
out_ptr.h libstdc++: Fix <memory> for -std=c++23 -ffreestanding [PR114866] 2024-05-14 10:50:19 +01:00
parse_numbers.h Update copyright years. 2024-01-03 12:19:35 +01:00
postypes.h Update copyright years. 2024-01-03 12:19:35 +01:00
predefined_ops.h Update copyright years. 2024-01-03 12:19:35 +01:00
ptr_traits.h Update copyright years. 2024-01-03 12:19:35 +01:00
quoted_string.h Update copyright years. 2024-01-03 12:19:35 +01:00
random.h libstdc++: Use 128-bit arithmetic for std::linear_congruential_engine [PR87744] 2024-02-15 11:43:21 +00:00
random.tcc libstdc++: Fix infinite loop in std::binomial_distribution [PR114359] 2024-03-19 15:59:44 +00:00
range_access.h Update copyright years. 2024-01-03 12:19:35 +01:00
ranges_algo.h Update copyright years. 2024-01-03 12:19:35 +01:00
ranges_algobase.h Update copyright years. 2024-01-03 12:19:35 +01:00
ranges_base.h Update copyright years. 2024-01-03 12:19:35 +01:00
ranges_cmp.h Update copyright years. 2024-01-03 12:19:35 +01:00
ranges_uninitialized.h Update copyright years. 2024-01-03 12:19:35 +01:00
ranges_util.h libstdc++: Implement P2165R4 changes to std::pair/tuple/etc [PR113309] 2024-02-01 14:59:46 -05:00
refwrap.h libstdc++: Simplify constraints on <=> for std::reference_wrapper 2024-04-19 21:06:29 +01:00
regex.h Update copyright years. 2024-01-03 12:19:35 +01:00
regex.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
regex_automaton.h Update copyright years. 2024-01-03 12:19:35 +01:00
regex_automaton.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
regex_compiler.h Update copyright years. 2024-01-03 12:19:35 +01:00
regex_compiler.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
regex_constants.h libstdc++: Consistently use noexcept, constexpr, nodiscard on bitmask ops 2024-02-28 11:27:46 +00:00
regex_error.h Update copyright years. 2024-01-03 12:19:35 +01:00
regex_executor.h Update copyright years. 2024-01-03 12:19:35 +01:00
regex_executor.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
regex_scanner.h Update copyright years. 2024-01-03 12:19:35 +01:00
regex_scanner.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
requires_hosted.h
sat_arith.h libstdc++: Define C++26 saturation arithmetic functions (P0543R3) 2023-11-17 15:28:30 +00:00
semaphore_base.h Update copyright years. 2024-01-03 12:19:35 +01:00
shared_ptr.h Update copyright years. 2024-01-03 12:19:35 +01:00
shared_ptr_atomic.h libstdc++: Fix comment typo in std::atomic<std::shared_ptr<T>> 2024-02-08 21:48:45 +00:00
shared_ptr_base.h Update copyright years. 2024-01-03 12:19:35 +01:00
slice_array.h Update copyright years. 2024-01-03 12:19:35 +01:00
specfun.h Update copyright years. 2024-01-03 12:19:35 +01:00
sstream.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
std_abs.h Update copyright years. 2024-01-03 12:19:35 +01:00
std_function.h libstdc++: Make std::function deduction guide support explicit object functions [PR113335] 2024-02-02 13:54:02 +00:00
std_mutex.h Update copyright years. 2024-01-03 12:19:35 +01:00
std_thread.h libstdc++: Implement std::formatter<std:🧵:id> without <sstream> [PR115099] 2024-05-22 10:06:52 +01:00
stl_algo.h libstdc++: Add nodiscard in <algorithm> 2024-03-14 16:58:15 +00:00
stl_algobase.h libstdc++: Add nodiscard in <algorithm> 2024-03-14 16:58:15 +00:00
stl_bvector.h libstdc++: Constrain std::vector default constructor [PR113841] 2024-03-22 22:39:06 +00:00
stl_construct.h libstdc++: Use feature test macros in <bits/stl_construct.h> 2024-03-22 22:39:05 +00:00
stl_deque.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_function.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_heap.h libstdc++: Add nodiscard in <algorithm> 2024-03-14 16:58:15 +00:00
stl_iterator.h libstdc++: Implement P2165R4 changes to std::pair/tuple/etc [PR113309] 2024-02-01 14:59:46 -05:00
stl_iterator_base_funcs.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_iterator_base_types.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_list.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_map.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_multimap.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_multiset.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_numeric.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_pair.h libstdc++: Heterogeneous std::pair comparisons [PR113386] 2024-04-15 19:26:09 +01:00
stl_queue.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_raw_storage_iter.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_relops.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_set.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_stack.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_tempbuf.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_tree.h libstdc++: Destroy allocators in re-inserted container nodes [PR114401] 2024-03-22 22:39:06 +00:00
stl_uninitialized.h Update copyright years. 2024-01-03 12:19:35 +01:00
stl_vector.h libstdc++: Constrain std::vector default constructor [PR113841] 2024-03-22 22:39:06 +00:00
stream_iterator.h Update copyright years. 2024-01-03 12:19:35 +01:00
streambuf.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
streambuf_iterator.h Update copyright years. 2024-01-03 12:19:35 +01:00
string_view.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
stringfwd.h Update copyright years. 2024-01-03 12:19:35 +01:00
text_encoding-data.h libstdc++: Fix Python scripts to output the correct filename 2024-03-19 15:20:07 +00:00
this_thread_sleep.h Update copyright years. 2024-01-03 12:19:35 +01:00
unicode-data.h libstdc++: Fix Python scripts to output the correct filename 2024-03-19 15:20:07 +00:00
unicode.h libstdc++: Fix typo in _Grapheme_cluster_view::_Iterator [PR115119] 2024-05-17 13:48:43 +01:00
uniform_int_dist.h Update copyright years. 2024-01-03 12:19:35 +01:00
unique_lock.h Update copyright years. 2024-01-03 12:19:35 +01:00
unique_ptr.h Update copyright years. 2024-01-03 12:19:35 +01:00
unordered_map.h Update copyright years. 2024-01-03 12:19:35 +01:00
unordered_set.h Update copyright years. 2024-01-03 12:19:35 +01:00
uses_allocator.h Update copyright years. 2024-01-03 12:19:35 +01:00
uses_allocator_args.h Update copyright years. 2024-01-03 12:19:35 +01:00
utility.h libstdc++: Add __is_in_place_index_v helper and use it in <variant> 2024-03-23 11:07:57 +00:00
valarray_after.h Update copyright years. 2024-01-03 12:19:35 +01:00
valarray_array.h Update copyright years. 2024-01-03 12:19:35 +01:00
valarray_array.tcc Update copyright years. 2024-01-03 12:19:35 +01:00
valarray_before.h Update copyright years. 2024-01-03 12:19:35 +01:00
vector.tcc libstdc++: Fix -Wstringop-overflow warning coming from std::vector [PR109849] 2024-06-03 21:52:58 +02:00
version.def libstdc++: Guard use of sized deallocation [PR114940] 2024-05-28 10:19:44 +01:00
version.h libstdc++: Guard use of sized deallocation [PR114940] 2024-05-28 10:19:44 +01:00
version.tpl libstdc++: Do not use def-file-line for each macro in <bits/version.h> 2024-02-01 15:26:54 +00:00