Commit Graph

1205 Commits

Author SHA1 Message Date
Vladimir Solontsov
68201831a5
Support named args in dynamic_format_arg_store (#1655). (#1663)
Dynamic arguments storage. Implementation of enhancement from issue
#1170.
2020-05-09 06:25:03 -07:00
Victor Zverovich
7f723fbcb8 Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
Victor Zverovich
c06851456d Purge basic_writer 2020-05-07 15:04:48 -07:00
Victor Zverovich
2f05054dd3 Purge basic_writer 2020-05-07 11:35:41 -07:00
Victor Zverovich
8f511fc12f Make copyfmt not throw (#1666) 2020-05-06 17:38:46 -07:00
Victor Zverovich
d6cea50d01 Remove deprecated APIs 2020-05-05 20:03:48 -07:00
Victor Zverovich
bab3f58003 Refactor pointer formatting 2020-05-03 20:33:25 -07:00
Victor Zverovich
a71bc9c825 Use '0' fill with numeric align for consistency with std::format 2020-05-03 09:52:31 -07:00
asraa
e2ff910675
Replace FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION with fmt-specific macro (#1650)
Signed-off-by: Asra Ali <asraa@google.com>
2020-04-29 09:12:43 -07:00
Victor Zverovich
1e1ac6e964 Check dynamic width/precision id at compile time (#1614) 2020-04-25 08:36:24 -07:00
Victor Zverovich
e51c449fe6 Revert "Check dynamic widht/precision id at compile time (#1614)"
This reverts commit 7d748a6f82.
2020-04-25 07:43:56 -07:00
Victor Zverovich
0463665ef1 Don't access a C string past precision in printf (#1595) 2020-04-22 17:10:23 -07:00
Victor Zverovich
7d748a6f82 Check dynamic widht/precision id at compile time (#1614) 2020-04-22 14:45:37 -07:00
Victor Zverovich
2b75bd7ce6 Get rid of do_check_format_string 2020-04-22 12:15:29 -07:00
Victor Zverovich
811b0f9054 Enable compile-time error tests 2020-04-22 11:00:20 -07:00
Victor Zverovich
5944fcad37 Remove remaining wchar_t instantiation 2020-04-19 16:48:15 -07:00
Victor Zverovich
c9a57b9a81 Fix incorrect assumptions about nul termination 2020-04-18 06:51:52 -07:00
Victor Zverovich
8a4630686e Improve handling of named arguments 2020-04-14 11:56:55 -07:00
Victor Zverovich
e99809f29d Fix ostream support in sprintf (#1631) 2020-04-12 07:53:17 -07:00
Victor Zverovich
bbb6b357c7 Add floating-point L specifier (#1624) 2020-04-10 07:16:20 -07:00
Victor Zverovich
7d01859ef1 Fix handling of unsigned char strings in printf 2020-04-08 13:05:42 -07:00
Victor Zverovich
d1d653d895 Implement the L specifier 2020-04-02 06:58:38 -07:00
Victor Zverovich
73c8437485 Follow naming conventions 2020-04-01 09:30:28 -07:00
Victor Zverovich
e588b02b17 Fix posix-mock-test 2020-04-01 08:42:14 -07:00
Victor Zverovich
80ce222ca6 Fix wide print overload (#1609) 2020-03-28 09:44:18 -07:00
Scott Ramsby
664dd88e31 Enable FMT_STRING() use with types other than string literals 2020-03-24 12:56:21 -07:00
Victor Zverovich
69779b4ed6 Fix handling of small precision in general format 2020-03-24 09:01:57 -07:00
Victor Zverovich
dd97f4920c Improve exception safety in dynamic_format_arg_store 2020-03-21 08:58:50 -07:00
Spirrwell
2559983e7a
Color formatting fixed for wide strings (fixes issue #1594) (#1596)
* Use std::char_traits::length for ansi_color_escape::begin

-Fixes issue #1594 https://github.com/fmtlib/fmt/issues/1594
2020-03-17 06:24:42 -07:00
Victor Zverovich
9f70fc3e7a Minor tweaks for dynamic_format_arg_store 2020-03-16 07:58:15 -07:00
Vladimir Solontsov
6012dc9ab4
Dynamic arguments storage. Implementation of enhancement from issue #1170. (#1584) 2020-03-16 07:00:29 -07:00
Nikolay Rapotkin
85050aa2e6 Ability to join elements of std::initializer_list was added 2020-03-15 16:10:00 -07:00
Victor Zverovich
ff486a72a7 Allow leading zeros in precision (#1579) 2020-03-14 11:37:38 -07:00
Victor Zverovich
678341275b Deprecate fmt::char8_t 2020-03-14 10:32:34 -07:00
Victor Zverovich
61c5a51604 Fix handling of empty tuples (#1588) 2020-03-14 07:41:08 -07:00
Victor Zverovich
f72a905eb3 Fix handling of volatile enums 2020-03-11 08:40:57 -07:00
Victor Zverovich
b1adaa9881 Remove gcc 4.4 workaround 2020-03-07 14:50:52 -08:00
Victor Zverovich
153f753bde Deprecate undocumented _u suffix 2020-03-04 19:20:19 -08:00
Victor Zverovich
eafd079868 Improve width computation 2020-03-04 17:17:34 -08:00
Victor Zverovich
1e8493196e Make compile-time checks in format_to handle references 2020-03-01 07:57:34 -08:00
Victor Zverovich
13d82e32bd Don't use internal GTest API 2020-02-24 11:32:34 -08:00
Victor Zverovich
f733882b55 Remove misleading FMT_USE_WINDOWS_H 2020-02-14 14:09:27 +01:00
Victor Zverovich
1f1b50707c Make formatter override implicit conversion to a C string 2020-02-07 19:24:36 -08:00
Victor Zverovich
b55ea58705 string_view::char_type -> value_type (#1539) 2020-02-01 12:27:44 -08:00
zeffy
1acb73f970 Fix formatting std::chrono::duration types to wide strings (#1533)
* Fix formatting chrono durations to wide strings

* Make format buffers const correct

* Add FormatWide chrono test case

* Fix incorrect wide encoding of 'µs'
I think might be a source file encoding issue, so I used \u00B5 instead.

* Update FormatWide test to use proper encoding of µs

* Revert changes to format_localized's parameters

* Use different overload of `std::time_put<T>::put` to avoid needing a format string

* Use utf8_to_utf16 instead of having redundant overloads of get_units

* Revert some minor changes

* Remove FMT_CONSTEXPR from expression

This should hopefully fix compilation on VS <2019

* Make suggested changes from code review

* Run clang-format on chrono.h

* Make sure unit isn't null before constructing a string_view from it
2020-01-23 18:48:36 -08:00
Victor Zverovich
09a13244c8 Disallow passing non-string-literals to FMT_STRING 2020-01-22 21:05:46 -08:00
Victor Zverovich
419db8baa1 Fix length computation of constexpr C strings 2020-01-22 18:25:07 -08:00
Victor Zverovich
b4218aa0f8 Test invalid fill 2020-01-19 16:52:36 -08:00
Victor Zverovich
e5f2f8ce7a Add variable-width fill support (#1109) 2020-01-19 14:49:51 -08:00
Victor Zverovich
c8dd9cc99d Use type_identity to block unnecessary template argument deduction (thanks Tim Song) 2020-01-15 10:27:50 -08:00