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
align.h
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
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
atomic_timed_wait.h
atomic_wait.h
basic_ios.h
basic_ios.tcc
basic_string.h libstdc++: Fix constexpr basic_string union member [PR113294] 2024-02-12 18:18:04 -05:00
basic_string.tcc
boost_concept_check.h
c++0x_warning.h
c++config libstdc++: Use _GLIBCXX_USE_BUILTIN_TRAIT for is_same 2024-02-09 10:11:47 -08:00
char_traits.h
charconv.h
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
concept_check.h
cow_string.h
cpp_type_traits.h
deque.tcc
elements_of.h
enable_special_members.h
erase_if.h
forward_list.h
forward_list.tcc
fs_dir.h
fs_fwd.h libstdc++: Consistently use noexcept, constexpr, nodiscard on bitmask ops 2024-02-28 11:27:46 +00:00
fs_ops.h
fs_path.h
fstream.tcc
functexcept.h
functional_hash.h
gslice.h libstdc++: Add comment to gslice::operator=(const gslice&) [PR100147] 2024-02-08 21:32:42 +00:00
gslice_array.h
hashtable.h libstdc++: Destroy allocators in re-inserted container nodes [PR114401] 2024-03-22 22:39:06 +00:00
hashtable_policy.h
indirect_array.h
invoke.h
ios_base.h libstdc++: Consistently use noexcept, constexpr, nodiscard on bitmask ops 2024-02-28 11:27:46 +00:00
istream.tcc
iterator_concepts.h
list.tcc
locale_classes.h
locale_classes.tcc
locale_conv.h
locale_facets.h
locale_facets.tcc
locale_facets_nonio.h
locale_facets_nonio.tcc
localefwd.h
mask_array.h
max_size_type.h
memory_resource.h
memoryfwd.h
mofunc_impl.h
move.h
move_only_function.h
new_allocator.h
node_handle.h libstdc++: Destroy allocators in re-inserted container nodes [PR114401] 2024-03-22 22:39:06 +00:00
ostream.tcc
ostream_insert.h
out_ptr.h libstdc++: Fix <memory> for -std=c++23 -ffreestanding [PR114866] 2024-05-14 10:50:19 +01:00
parse_numbers.h
postypes.h
predefined_ops.h
ptr_traits.h
quoted_string.h
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
ranges_algo.h
ranges_algobase.h
ranges_base.h
ranges_cmp.h
ranges_uninitialized.h
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
regex.tcc
regex_automaton.h
regex_automaton.tcc
regex_compiler.h
regex_compiler.tcc
regex_constants.h libstdc++: Consistently use noexcept, constexpr, nodiscard on bitmask ops 2024-02-28 11:27:46 +00:00
regex_error.h
regex_executor.h
regex_executor.tcc
regex_scanner.h
regex_scanner.tcc
requires_hosted.h
sat_arith.h
semaphore_base.h
shared_ptr.h
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
slice_array.h
specfun.h
sstream.tcc
std_abs.h
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
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
stl_function.h
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
stl_iterator_base_types.h
stl_list.h
stl_map.h
stl_multimap.h
stl_multiset.h
stl_numeric.h
stl_pair.h libstdc++: Heterogeneous std::pair comparisons [PR113386] 2024-04-15 19:26:09 +01:00
stl_queue.h
stl_raw_storage_iter.h
stl_relops.h
stl_set.h
stl_stack.h
stl_tempbuf.h
stl_tree.h libstdc++: Destroy allocators in re-inserted container nodes [PR114401] 2024-03-22 22:39:06 +00:00
stl_uninitialized.h
stl_vector.h libstdc++: Constrain std::vector default constructor [PR113841] 2024-03-22 22:39:06 +00:00
stream_iterator.h
streambuf.tcc
streambuf_iterator.h
string_view.tcc
stringfwd.h
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
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
unique_lock.h
unique_ptr.h
unordered_map.h
unordered_set.h
uses_allocator.h
uses_allocator_args.h
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
valarray_array.h
valarray_array.tcc
valarray_before.h
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