Victor Zverovich
5e7c70e206
Simplify arg_formatter_base
2020-06-07 19:38:43 -07:00
Victor Zverovich
38cc68b3e5
Inline visitor
2020-06-07 08:36:33 -07:00
Victor Zverovich
6732ea5000
Make symbols readable
2020-06-07 07:49:11 -07:00
Victor Zverovich
50bad7d62d
Optimize format string parsing
2020-06-06 10:15:19 -07:00
Victor Zverovich
f11e968708
Optimize format string parsing
2020-06-06 08:15:33 -07:00
Victor Zverovich
09737dd83b
Optimize format handler
2020-06-06 07:17:02 -07:00
Victor Zverovich
d9e3d6e6ed
Move format_handler to detail
2020-06-06 06:38:48 -07:00
Victor Zverovich
795b47a7b5
Fix a warning ( #1712 )
2020-06-05 08:24:09 -07:00
Victor Zverovich
21409cfdda
Fix warnings
2020-06-04 07:50:07 -07:00
Victor Zverovich
88c8d534e7
Move digits10 to where they belong and add comments
2020-06-04 06:39:18 -07:00
Victor Zverovich
16aec06179
Cleanup arg_formatter_base
2020-05-31 10:58:52 -07:00
Victor Zverovich
1e1193590d
Fix format_decimal overloads
2020-05-31 10:12:34 -07:00
Victor Zverovich
0893c9c2ef
Inline parse_format_string
2020-05-30 20:30:18 -07:00
Victor Zverovich
3245145a41
Remove undocumented buffer_range and output_range
2020-05-30 13:07:52 -07:00
Victor Zverovich
7d22bebb6f
Remove uses of buffer_range
2020-05-30 06:50:45 -07:00
Victor Zverovich
5aabf1f715
Simplify copy_str
2020-05-29 17:59:08 -07:00
Victor Zverovich
19c5b5d159
Simplify arg_formatter
2020-05-29 16:53:12 -07:00
Victor Zverovich
519571edec
Simplify arg_formatter_base
2020-05-29 14:44:18 -07:00
Victor Zverovich
ac8dfd841f
Improve handling of separators
2020-05-29 08:15:44 -07:00
Victor Zverovich
2c6165a22b
Reduce the number of comparisons
2020-05-29 05:42:35 -07:00
Victor Zverovich
28639969ef
Use memcpy for copying digits
2020-05-28 22:33:08 -07:00
Victor Zverovich
1a716caf5d
Optimize common case
2020-05-25 19:16:35 -07:00
Victor Zverovich
bc1b89da26
Temporarily revert parsing changes
2020-05-22 15:39:33 -07:00
Victor Zverovich
a7fb321ac6
Remove a redundant branch
2020-05-22 15:39:33 -07:00
Victor Zverovich
a265e25b79
Optimize small string parsing
2020-05-19 13:44:22 -07:00
Victor Zverovich
2aa2526f64
Optimize small string concatenation
2020-05-19 11:45:09 -07:00
Victor Zverovich
8d78045e7c
Move void_t to where it's used
2020-05-18 10:46:25 -07:00
Barry Revzin
c66aae1652
Adding sentinel support to fmt::join(). ( #1689 )
2020-05-18 06:31:01 -07:00
Victor Zverovich
6d66de3805
Add c specifier support to integral types ( #1652 )
2020-05-17 08:44:59 -07:00
Victor Zverovich
8069265373
internal -> detail ( #1538 )
2020-05-10 07:34:30 -07:00
Victor Zverovich
963ee08310
Simplify named arguments
2020-05-09 16:43:31 -07:00
Victor Zverovich
02a6fe59fb
Named arguments go brrr
2020-05-09 13:22:38 -07:00
Markus Werle
73e335ed38
Make implicit capture explicit for C++20 ( #1669 )
2020-05-09 10:55:37 -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
f0ce21164c
Revert enum change
2020-05-07 07:25:33 -07:00
peterbell10
44639b11fe
Fix some warnings ( #1667 )
...
* Fix sign-conversion warning
* Add missing "extern template" declarations for non-header-only build
* Use typed enums to fix Wsigned-enum-bitfield warnings
* Consolidate FMT_HEADER_ONLY code
2020-05-07 06:14:07 -07:00
Victor Zverovich
1c86a99e8f
Purge basic_writer
2020-05-06 18:46:01 -07:00
Victor Zverovich
b0f47a13e6
Separate nonfinite formatting
2020-05-06 07:19:37 -07:00
Victor Zverovich
d6cea50d01
Remove deprecated APIs
2020-05-05 20:03:48 -07:00
Victor Zverovich
40bc7163fb
Move FMT_MAYBE_UNUSED to where it's actually used
2020-05-05 19:41:07 -07:00
Victor Zverovich
7b66e2f219
Inherit arg_formatter_base from basic_writer
2020-05-03 21:05:45 -07:00
Victor Zverovich
bab3f58003
Refactor pointer formatting
2020-05-03 20:33:25 -07:00
Victor Zverovich
9cc7edfddc
Move int_writer to the namespace scope
2020-05-03 17:34:48 -07:00
Victor Zverovich
8d9d528bf5
Improve handling of alignment
2020-05-03 10:58:18 -07:00
Victor Zverovich
8efd1a8ef6
Improve handling of alignment
2020-05-03 10:08:57 -07:00
Victor Zverovich
a71bc9c825
Use '0' fill with numeric align for consistency with std::format
2020-05-03 09:52:31 -07:00
Victor Zverovich
60d85d598c
Suppress ubsan warning
2020-05-03 08:43:10 -07:00
Victor Zverovich
c3099beb6f
Cleanup
2020-05-02 22:00:34 -07:00
Victor Zverovich
cbb4cb8991
Remove undocumented deprecated APIs
2020-05-02 21:34:44 -07:00
Victor Zverovich
d6abb2fa03
Reduce library size
2020-05-01 17:23:45 -07:00
Victor Zverovich
7ca89bf87a
Reduce template bloat in write_int
2020-05-01 07:56:57 -07:00
Victor Zverovich
bca82719ab
Pass iterator by value
2020-04-30 21:06:17 -07:00
Victor Zverovich
99da389627
Make write_padded non-members
2020-04-30 16:05:30 -07:00
Victor Zverovich
f19d667943
Bump fuzzer allocation limit
2020-04-30 08:45:50 -07:00
Victor Zverovich
3e69847616
Reduce branching in write_padded
2020-04-30 06:33:45 -07:00
Victor Zverovich
9ac1eebd47
Reduce library size
2020-04-29 17:37:05 -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
9dde9f0131
Reduce library size
2020-04-27 20:43:30 -07:00
Victor Zverovich
b1af642d1d
Reduce library size
2020-04-27 18:50:49 -07:00
Victor Zverovich
6f435f55c8
Improve compile time by using extern template ( #1452 )
2020-04-26 14:02:15 -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
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
4a1d5931cb
Simplify udl_formatter with FMT_STRING
2020-04-22 11:26:05 -07:00
Victor Zverovich
56bc86ffac
Suppress bogus MSVC analysis warnings
2020-04-22 07:51:25 -07:00
Victor Zverovich
e253b371b2
Don't generate RTTI for allocator
2020-04-19 15:57:48 -07:00
Victor Zverovich
c9a57b9a81
Fix incorrect assumptions about nul termination
2020-04-18 06:51:52 -07:00
Victor Zverovich
f46f5ecaf0
Reenable constexpr _compile on GCC 9
2020-04-17 06:10:57 -07:00
Johan Norberg
84898b4626
Remove warning in format.h when compiling with gcc and -Wshadow
...
build/_deps/fmt-src/include/fmt/format.h: In member function ‘decltype (ctx.out()) fmt::v6::formatter<fmt::v6::bytes>::format(fmt::v6::bytes, FormatContext&)’:
build/_deps/fmt-src/include/fmt/format.h:3251:58: error: declaration of ‘writer’ shadows a global declaration [-Werror=shadow]
internal::basic_writer<range_type> writer(range_type(ctx.out()));
^~~
build/_deps/fmt-src/include/fmt/format.h:2741:53: note: shadowed declaration is here
using writer FMT_DEPRECATED_ALIAS = internal::writer;
2020-04-15 07:31:24 -07:00
Victor Zverovich
8a4630686e
Improve handling of named arguments
2020-04-14 11:56:55 -07:00
Victor Zverovich
e30d8391e4
Suppress an MSVC warning ( #1622 )
2020-04-11 07:49:00 -07:00
Victor Zverovich
8cd8ef03eb
Simplify warning suppression
2020-04-11 06:17:31 -07:00
Victor Zverovich
bbb6b357c7
Add floating-point L specifier ( #1624 )
2020-04-10 07:16:20 -07:00
Victor Zverovich
d1d653d895
Implement the L specifier
2020-04-02 06:58:38 -07:00
Victor Zverovich
1a62711d01
Reduce binary size
2020-03-31 08:07:11 -07:00
Victor Zverovich
2864e8432a
Update readme and add compatibility option
2020-03-26 07:18:27 -07:00
Victor Zverovich
96c68afe69
Fix -Wsign-conversion warnings
2020-03-25 07:46:00 -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
2951169481
Move FMT_USE_FLOAT and friends to fmt/format.h
2020-03-20 07:55:43 -07:00
Alberto Aguirre
d3e668418f
Allow disabling floating point support ( #1590 )
...
* Allow disabling floating point support
Add FMT_USE_FLOAT, FMT_USE_DOUBLE and FMT_USE_LONG_DOUBLE to allow a
user of the library to configure the float types they want to allow.
This is specially useful in embedded environements where code size is
important.
* Avoid conditional macros to disable float support
* Add is_supported_floating_point constexpr function
* Fix empty-body warning
2020-03-20 06:46:31 -07:00
Vladimir Solontsov
6012dc9ab4
Dynamic arguments storage. Implementation of enhancement from issue #1170 . ( #1584 )
2020-03-16 07:00:29 -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
Dair Grant
02bfd8a9a5
Add FMT_HAS_CPP14_ATTRIBUTE / FMT_HAS_CPP17_ATTRIBUTE to test for language-specific attributes.
...
FMT_DEPRECATED is now defined as FMT_HAS_CPP14_ATTRIBUTE(deprecated), as this attribute was introduced in C++14.
FMT_FALLTHROUGH is now defined as FMT_HAS_CPP17_ATTRIBUTE(fallthrough), as this attribute was introduced in C++17.
FMT_MAYBE_UNUSED is defined as FMT_HAS_CPP17_ATTRIBUTE(maybe_unused), as this attribute was introduced in C++17.
FMT_MAYBE_UNUSED has been applied to fix a couple of -Wunused-member-function warnings from clang.
2020-03-13 09:03:52 -07:00
Victor Zverovich
941d5e147a
Workaround broken fallthrough attribute in the PGI compiler ( #1583 )
2020-03-11 07:56:23 -07:00
Dair Grant
29a1ea795a
Fix clang -Wdisabled-macro-expansion warning from FMT_STRING_IMPL.
...
FMT_STRING_IMPL has an internal helper named FMT_STRING, however FMT_STRING is also the name of the macro that invokes FMT_STRING_IMPL.
Renaming this helper avoids the appearance of a recursive macro.
2020-03-06 07:00:47 -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
refnum
75a4525e5f
Move FMT_CLANG_VERSION definition to core.h ( #1568 )
...
Previously format.h defined FMT_CLANG_VERSION after including core.h, however core.h tests FMT_CLANG_VERSION when it defines FMT_API.
2020-02-29 17:19:34 -08:00
fghzxm
2161a73f2b
Fix FMT_FORMAT_AS const specifier position ( #1554 )
...
The current `FMT_FORMAT_AS` macro will make `formatter<Char *>::format`
have the first argument type `const Char *&` which is incorrect an
should be `Char *const &`. This pull request fixes that by changing the
first argument type in the macro definition body from `const Type &` to
`Type const &`.
2020-02-23 07:27:22 -08:00
IkarusDeveloper
e00997b004
improved use of find ( #1560 )
...
* improved use of find
*begin is supposed to be different from '{' when this find is used, so we can avoid checking it.
2020-02-21 14:43:06 -08:00
Victor Zverovich
3bafd0749b
Fix to_string docs
2020-02-15 09:51:35 +01:00
Victor Zverovich
dc22360c34
Workaround broken UDL templates in GCC < 6.4
2020-02-10 17:08:14 +01:00
Victor Zverovich
24924128e3
Fix a link error in gcc8 ( #1548 )
2020-02-07 18:34:05 -08:00
Victor Zverovich
09a13244c8
Disallow passing non-string-literals to FMT_STRING
2020-01-22 21:05:46 -08:00