Victor Zverovich
0497875ff3
Stop the orgy of casts
2018-12-05 06:27:31 -08:00
Victor Zverovich
37dc495b9d
Simplify MSVC workaround
2018-12-05 06:22:18 -08:00
liuping
2ff4996d05
Fix ambiguous complier error C2666 in vs2017.The '+' opeator may cause ambiguity.Avoid implicit conversion.
2018-12-05 05:55:43 -08:00
Florin Iucha
77656c672c
Fix sign-conversion warnings reported by Clang7
2018-12-03 16:22:59 -08:00
Victor Zverovich
ea5e4790bd
Fix formatting
2018-12-03 08:58:48 -08:00
Johan J
e867768ee6
Do not override user provided compile flag
2018-12-03 07:31:19 -08:00
Daniela Engert
e7e2ab1070
Make return type of basic_format_args::max_size() consistent.
...
This squashes nasty narrowing conversion warnings.
2018-12-01 17:07:21 -08:00
Victor Zverovich
68214bd904
More time formatting
2018-11-30 20:12:01 -08:00
Victor Zverovich
bcf3fcd673
Clean up bit fiddling for argument packing
2018-11-30 17:04:49 -08:00
Victor Zverovich
9dcf127fa5
Workaround a bogus MSVC warning
2018-11-30 13:47:04 -08:00
Victor Zverovich
b8b06e3e10
Fix conversion warnings in Grisu
2018-11-30 10:37:40 -08:00
Victor Zverovich
322b2594e0
Implement more time specifiers
2018-11-30 09:25:18 -08:00
Victor Zverovich
fa1d4dbcfd
Fix warnings
2018-11-28 16:15:15 -08:00
Victor Zverovich
99744f8f8f
Suppress unfixable warning
2018-11-28 12:52:41 -08:00
Victor Zverovich
f5fe849238
Specialize formatter for chrono durations
2018-11-28 11:39:21 -08:00
Victor Zverovich
a5a9805a91
First stub at the datetime format parser
2018-11-25 17:25:22 -08:00
Victor Zverovich
645c76a9a5
Fix dummy warnings
2018-11-25 15:33:28 -08:00
Daniela Engert
fecb2d6f0d
Eliminate msvc compiler warnings ( #931 )
...
The sheer presence of 'std::gmtime' or 'std::localtime' gives rise to C4996 warnings in Microsofts compilers. Alas, the 'fallback(internal::null<>)'functions containing these library calls are never ADL-picked in the respective 'handle(internal::null<>)' selectors. Therefore hiding the fallbacks from msvc is perfectly fine.
2018-11-25 13:48:52 -08:00
Victor Zverovich
64690d3a97
Add context_base::arg()
2018-11-24 10:49:48 -08:00
Victor Zverovich
01640f44cf
Fully qualify dummy_int ( #941 )
2018-11-24 06:22:59 -08:00
tnovotny
e37d6a9840
add make_printf_args and make_wprintf_args functions ( #934 )
...
* add make_printf_args and make_wprintf_args to printf.h
add minimal test for make_printf_args and make_wprintf_args to printf-test.cc
renamed the old printf_context template to basic_printf_context_t. the original wish was to rename it basic_printf_context, but that clashed with the name of the inner typedef. this style matches the format_context_t struct.
2018-11-22 13:57:07 -08:00
Victor Zverovich
982ee5c699
parse_context -> format_parse_context
2018-11-21 07:10:22 -08:00
Victor Zverovich
b7b8548559
thousands_sep -> thousands_sep_impl ( #939 )
2018-11-20 15:43:17 -08:00
Victor Zverovich
6c95fb3562
Default Context to format_context
2018-11-18 07:19:25 -08:00
christinaa
16b78ee629
fix incompatibilities with c++2a mode in clang
2018-11-17 08:38:04 -08:00
Victor Zverovich
19e008876b
More locale support
2018-11-14 16:25:49 -08:00
Victor Zverovich
f2ee988105
Improve locale support
2018-11-14 12:07:39 -08:00
Victor Zverovich
e01579231d
Disallow leading zeros in arg-id
2018-11-08 08:48:56 -08:00
Victor Zverovich
a23d592472
Fix check_format_string ( #925 )
2018-11-03 16:51:15 -07:00
Victor Zverovich
324eac1aa5
Make locales work with any character type
2018-10-28 09:03:27 -07:00
Victor Zverovich
bdda4d6030
Simplify compile-time strings
2018-10-28 09:02:03 -07:00
Daniela Engert
5ee1a4bc8a
check for property 'mutable iterator' and SFINAE on it
2018-10-28 08:57:43 -07:00
XZiar
2dea780fbd
change type naming and fix sfinae bug
2018-10-28 06:00:55 -07:00
XZiar
b98e8301d5
add non-char support for compile-time format check
2018-10-28 06:00:55 -07:00
Victor Zverovich
ccd3e8bbf3
Make is_constructible public ( #918 )
2018-10-27 17:10:19 -07:00
Victor Zverovich
73cfd8f325
Fix colored print
2018-10-25 17:18:46 -07:00
Victor Zverovich
0a96c032b9
Parameterize v*printf on string type ( #920 )
2018-10-25 13:52:08 -07:00
Victor Zverovich
61e6d2e38c
Fix core version of vformat_to
2018-10-25 06:21:41 -07:00
Victor Zverovich
ea4010d704
Merge has_to_string_view into is_string
2018-10-24 18:16:00 -07:00
Victor Zverovich
486fff597c
Add sprintf_format instantiations and remove syntactic noise
2018-10-24 16:46:32 -07:00
Daniela Engert
1e3dcbba81
fix: 'format_to_n' compiles 'std::back_inserter' arguments
...
std::back_insert_iterators model the OutputIterator concept but differ considerably in their traits and behavior. In particular the former made compilation to fail when format_to_n is given a back_inserter as first argument. The emulation of an OutputIterator is not perfect due to the behavioural differences of back_insert_iterators (e.g. assignment always implies increment) but good enough to be used within fmt's machinery.
2018-10-24 16:45:18 -07:00
Victor Zverovich
f0328f8e36
Use char_traits::length in string_view ctor ( #914 )
2018-10-24 15:21:21 -07:00
Victor Zverovich
20c708bf6d
Fix build on gcc 4.4
2018-10-24 10:52:02 -07:00
Victor Zverovich
2d2326a76d
Fix compilation with older gcc
2018-10-23 07:31:24 -07:00
Victor Zverovich
1ec0272303
Get rid of FMT_UNION
2018-10-22 20:19:31 -07:00
Daniela Engert
2c81c851b2
Adapt any string-like type to be used by {fmt} just like the standard string types already supported. The adaption is totally non-intrusive.
...
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-22 18:25:52 -07:00
Victor Zverovich
13d472bd8c
Compute output size for grisu
2018-10-18 17:16:50 -07:00
Victor Zverovich
b71d3fe7ab
Remove use_grisu
2018-10-17 17:01:45 -07:00
Victor Zverovich
847abb6f8f
Fix test
2018-10-17 11:57:06 -07:00
Victor Zverovich
dda47c9466
Merge min_digits and max_digits
2018-10-17 10:49:30 -07:00
Victor Zverovich
2924622157
Fix naming of basic_format_specs members
2018-10-17 10:13:10 -07:00
Victor Zverovich
bda5f9a556
Replace grisu2_specs with core_format_specs
2018-10-17 08:55:45 -07:00
Victor Zverovich
b1ca608bac
Remove unused empty_spec
2018-10-17 08:39:58 -07:00
Victor Zverovich
e8efdef8de
Avoid extra copy
2018-10-17 08:19:46 -07:00
Victor Zverovich
98f1c1fe87
Remove unused code
2018-10-14 15:36:45 -07:00
Victor Zverovich
50b18a3c10
Integrate Grisu
2018-10-14 14:33:25 -07:00
Victor Zverovich
699297520a
Implement Grisu rounding
2018-10-13 11:18:54 -07:00
Victor Zverovich
4bb76ef0c7
Remove redundant definition of print
2018-10-13 11:15:46 -07:00
Victor Zverovich
ddd7caf38e
Fix locale-dependent formatting ( #905 )
2018-10-13 11:15:41 -07:00
Victor Zverovich
08a65c2282
Workaround broken constexpr in MSVC2017
2018-10-11 06:38:25 -07:00
Victor Zverovich
57983423c3
Remove signbit workaround
2018-10-10 09:41:46 -07:00
superfunc
939fbe5567
Remove basic_fixed_buffer.
...
Issue #873 indicates that this class is no longer required,
as it has been superseded by a new API.
Fixes #873
2018-10-09 06:51:01 -07:00
Daniela Engert
f27defc639
Parameterize printf functions on the type of the format string.
...
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-08 06:22:04 -07:00
Daniela Engert
6a685571df
Make 'std::*::basic_string_view' a valid argument type for 'format_str' parameters.
...
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-08 06:12:02 -07:00
Victor Zverovich
87a0408c64
Fix ostream.h build
2018-10-07 12:58:20 -07:00
Victor Zverovich
2b5acad4a9
Remove redundant size argument to write_padded
2018-10-07 12:45:34 -07:00
Victor Zverovich
655ce53383
is_format_string -> is_string
2018-10-07 12:45:22 -07:00
Daniela Engert
fea712abb1
Parameterize ostream functions on the type of the format string.
...
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-07 09:21:14 -07:00
Daniela Engert
f16a118e88
Fix non-matching char types.
...
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-07 05:56:21 -07:00
Victor Zverovich
041bf83d9b
Improve fmt::format readability
2018-10-05 18:42:02 -07:00
Victor Zverovich
f5480635c0
visit -> visit_format_arg
2018-10-05 07:15:41 -07:00
Victor Zverovich
cdf3fa08dc
Put related code together in fmt/core.h
2018-10-04 19:44:09 -07:00
Victor Zverovich
38325248e5
Count width in code points ( #628 )
2018-10-03 20:09:46 -07:00
Daniela Engert
deb901b9e4
Parameterize core functions on the type of the format string.
...
Take #2 of n
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-03 14:19:08 -07:00
Victor Zverovich
0f98de3011
Update docs
2018-10-03 12:07:55 -07:00
Victor Zverovich
c797708fcc
Workaround strlen being non-constexpr in ARM toolchain
2018-10-03 09:23:49 -07:00
Victor Zverovich
63a87beba4
Add to_string_view
2018-10-01 18:48:18 -07:00
Victor Zverovich
4e0c314654
checked_format_args -> checked_args
2018-10-01 07:14:59 -07:00
Victor Zverovich
c3538a1eee
Simplify variadic functions further
2018-09-30 22:19:32 -07:00
Victor Zverovich
2d7d0835d7
Simplify variadic functions
2018-09-30 21:52:47 -07:00
Victor Zverovich
3f4cfa6c60
Implement UTF-8 string support
2018-09-30 15:45:58 -07:00
Victor Zverovich
f8027414f5
Impelement char8_t support
2018-09-30 12:31:25 -07:00
Victor Zverovich
76a47d41c8
Cleanup the use of FMT_CHAR
2018-09-30 08:45:57 -07:00
Daniela Engert
267fdc7a1b
Parameterize core functions on the type of the format string.
...
Take #1 of n
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-09-30 08:40:58 -07:00
Victor Zverovich
5bced12421
Parameterize more functions on string type
2018-09-30 08:02:19 -07:00
Steven Hoving
674999c527
fix vs2017 warning fmt::v5::localtime 'not all control paths return a value'.
2018-09-30 07:23:35 -07:00
Victor Zverovich
e4fea22d15
Make char8_t a strongly-typed enum
2018-09-30 07:11:37 -07:00
Victor Zverovich
66992e90d2
Clarify that writing to memory_buffer appends ( #877 )
2018-09-28 06:22:12 -07:00
Guillaume Fraux
e864acfdbd
Fix compilation with intel compilers (ICC/ICPC) v14.0
2018-09-27 07:11:23 -07:00
Daniela Engert
4cf21f58b2
constrain templated format_to on proper format string type.
...
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-09-26 21:05:47 -07:00
Victor Zverovich
d7f17613f5
Fix compilation on platforms with exotic double ( #878 )
2018-09-26 08:45:34 -07:00
Victor Zverovich
e4ca37ccf6
Parameterize format_to on string type ( #880 )
2018-09-25 07:47:15 -07:00
Victor Zverovich
d66fa2216e
Reduce syntactic noise
2018-09-23 14:31:14 -07:00
Victor Zverovich
48e6dcd0f2
Implement workarounds for gcc 4.4
2018-09-23 12:29:48 -07:00
Victor Zverovich
0ea3221d34
Remove is_named_arg and add FMT_CHAR
2018-09-23 09:44:01 -07:00
Daniela Engert
73c53d7833
Parameterize 'printf(rgb color, ...)' and 'vprint_rgb(rgb color, ...)' on the type of the format string.
...
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-09-23 09:15:27 -07:00
Victor Zverovich
d41be23acd
Simplify string_view detection
2018-09-23 07:29:35 -07:00
Victor Zverovich
2def9e4c82
Remove FMT_DTOR_NOEXCEPT
2018-09-22 18:51:32 -07:00
Victor Zverovich
ff6e46ed97
More cleanup
2018-09-22 16:00:34 -07:00
Victor Zverovich
715f2b4c00
Remove require_wchar and internalize no_formatter_error
2018-09-21 18:25:24 -07:00