fmt/include/fmt
matrackif 0bbc9708f9
Implement c++20 std::chrono::duration subsecond formatting (#2623)
* Add support for subsecond printing for std::chrono::duration according to the c++20 standard

* Remove assert test that overflows intmax_t

* * Hopefully fix int64_t to int32_t conversion errors.
* Allow proper Duration::rep type to propagate via template argument deduction

* * Hopefully fix int64_t to int32_t conversion errors.
* Allow proper Duration::rep type to propagate via template argument deduction

* Fix sign conversion (-Wsign-conversion) warning treated as error in num_digits()

* Format chrono.h with clang-format

* Remove extra forward slash in doxygen style comment

Co-authored-by: Victor Zverovich <victor.zverovich@gmail.com>

* Apply all suggestions from GitHub, except for replacing the utility subsecond_helper class with a function

* * Move logic of handling subseconds from utility class to function with name write_fractional_seconds()
* Revert write(Rep value, int width) function to previous state

* Fix -Wshadow warning

* Remove unsued get_subseconds() function, its logic has been moved to write_fractional_seconds()

* Change comment from lowercase int to uppercase Int

* Simplify test check

* Integrate suggested changes

* Remove static from detail functions, they are no longer member functions of a class and static is unnecessary.
* Change comment from "amount" to "number"

Co-authored-by: Victor Zverovich <victor.zverovich@gmail.com>
2021-12-09 06:45:13 -08:00
..
args.h Add copy constructor for dynamic_format_arg_store, and test 2021-07-23 09:35:09 -07:00
chrono.h Implement c++20 std::chrono::duration subsecond formatting (#2623) 2021-12-09 06:45:13 -08:00
color.h Add faint, blink, reverse and conceal to the emphases (#2394) 2021-07-02 20:03:55 -07:00
compile.h fix: check to make sure both 'if constexpr' and return type deduction are available 2021-10-14 10:44:24 -07:00
core.h Mark grow as FMT_CONSTEXPR20 (#2630) 2021-12-03 07:13:30 -08:00
format-inl.h Detect overflow on large precision 2021-12-05 07:26:58 -08:00
format.h Optimize tm formatting (Non C-locales and %Z) (#2617) 2021-12-04 11:02:31 -08:00
locale.h wchar.h -> xchar.h because it handles other code unit types too 2021-05-29 09:37:17 -07:00
os.h Reformat all source code; no functional changes 2021-11-25 09:15:25 -08:00
ostream.h Optimize tm formatting (Non C-locales and %Z) (#2617) 2021-12-04 11:02:31 -08:00
printf.h Refactor presentation types 2021-09-06 13:32:33 -07:00
ranges.h Make specifiers support in tuple_join an opt-in 2021-09-05 07:34:06 -07:00
xchar.h Workaround clang/gcc incompatibility 2021-07-02 13:29:22 -07:00