Commit Graph

300 Commits

Author SHA1 Message Date
Victor Zverovich
23759b2688 basic_arg -> basic_format_arg, arg_store -> format_arg_store 2018-04-04 07:38:21 -07:00
Victor Zverovich
4975297eb0 Simplify counting iterators 2018-03-31 07:47:30 -10:00
Victor Zverovich
e8e006f4e7 Fix compile checks for mixing narrow and wide strings (#690) 2018-03-30 09:29:47 -10:00
Victor Zverovich
c5ebecf7c6 Document format_to_n 2018-03-30 08:31:41 -10:00
Victor Zverovich
3cf0526316 Return output iterator to the end from format_to_n 2018-03-30 08:20:12 -10:00
Victor Zverovich
174087bfdb Implement format_to_n 2018-03-29 15:13:10 -10:00
Victor Zverovich
050f3f1f0e Remove parts of obsolete write API 2018-03-29 07:36:37 -10:00
Sebastian König
e90b1da367 Fix linker errors using fmt as shared library in MSVC 2018-03-28 07:14:56 -10:00
Germán Méndez Bravo
7a41d61d79 Add make_printf_args
Fixes #687
2018-03-27 07:15:51 -10:00
Victor Zverovich
4fea018b2d Fix string_view detection 2018-03-26 07:00:41 -10:00
Victor Zverovich
6957d28cfb Detect string_view on libc++ (#686) 2018-03-26 06:50:22 -10:00
Victor Zverovich
8c29459eda Fix handling of empty string_view (#689) 2018-03-21 09:01:51 -07:00
Victor Zverovich
a24005d5fd Fix a narrowing warning 2018-03-21 08:29:06 -07:00
Victor Zverovich
3651b7fca6 Fix a narrowing warning 2018-03-21 07:59:42 -07:00
Victor Zverovich
3da71d51e0 Move source files to the src directory 2018-03-21 07:50:59 -07:00
Victor Zverovich
17258e9c63 Update docs 2018-03-19 19:47:14 -07:00
Victor Zverovich
6d339e32a0 Improve comment 2018-03-16 16:26:31 -04:00
Victor Zverovich
c3d05245fe Fix a shadowing warning 2018-03-16 16:26:11 -04:00
Victor Zverovich
505b3ae66f Workaround GCC bug 67371 (#682) 2018-03-16 12:02:19 -04:00
Victor Zverovich
70dffc639a Remove unnecessary check 2018-03-15 09:58:26 -04:00
Victor Zverovich
df828f88da Don't define FMT_GCC_VERSION on clang 2018-03-15 09:55:31 -04:00
Victor Zverovich
42f70c8b4f Avoid narrowing casts 2018-03-15 09:45:31 -04:00
Elias Kosunen
10b939b096 Remove unneeded usage of anonymous struct on clang 2018-03-15 09:28:50 -04:00
Elias Kosunen
3adfaae20c Remove extra semicolon in format_args constructor 2018-03-15 09:28:50 -04:00
Jonathan Müller
4006678577
Fix warnings under MSVC (#679)
Closes #678.
2018-03-14 20:17:15 +01:00
Vasili Galka
acb469ae2e Fixed UTF8/16 converters to support empty string input
Previously an exception was thrown since Win32 WideCharToMultiByte API
returns error on zero-length input.
2018-03-13 21:33:21 -04:00
Victor Zverovich
7db0e94b9e Fix handling of numeric alignment with no width (#675) 2018-03-11 21:04:42 -04:00
Victor Zverovich
9facc119a6 Update docs 2018-03-10 09:44:37 -08:00
Victor Zverovich
daf650c49a Disallow formatting of multibyte strings into a wide buffer (#606) 2018-03-10 06:46:41 -08:00
Victor Zverovich
ca93be130a Use fmt(s) as an alias for FMT_STRING(s) 2018-03-09 15:40:40 -08:00
Victor Zverovich
80e57c7a3d Update to new naming conventions 2018-03-07 07:36:13 -08:00
Victor Zverovich
ae3cc844e7 Check format string at compile time in print 2018-03-07 05:41:45 -08:00
Victor Zverovich
585512fc7c Remove unnecessary instantiations 2018-03-04 15:14:02 -08:00
Victor Zverovich
7755cdc199 Make symbols readable 2018-03-04 15:00:22 -08:00
Victor Zverovich
f867d08239 Update docs 2018-03-04 12:09:34 -08:00
Victor Zverovich
a103b9bc46 Workaround missed optimization in gcc (#668) 2018-03-04 11:45:20 -08:00
Victor Zverovich
bb47109a78 Cleanup 2018-03-04 11:25:40 -08:00
Victor Zverovich
f1ede6380b Make inline_buffer_size public and update docs 2018-03-04 10:33:42 -08:00
Victor Zverovich
4023291759 Update docs 2018-03-04 09:55:17 -08:00
Victor Zverovich
b7632e9641 Make format_to return iterator and update docs 2018-03-04 08:13:08 -08:00
Victor Zverovich
5281ea6ad2 do_vformat_to -> vformat_to and update docs 2018-03-04 06:40:43 -08:00
Victor Zverovich
418659adbe Fix compilation errors on gcc 4.4 2018-03-03 14:04:59 -08:00
Victor Zverovich
1d2adef28d Fix compilation errors on gcc 4.4 2018-03-01 03:45:25 -08:00
Victor Zverovich
45518c3fe1 Fix compilation errors on gcc 4.4 2018-02-28 07:47:24 -08:00
Victor Zverovich
698d909706 Workaround a bug in gcc 5.1 2018-02-28 06:14:56 -08:00
Victor Zverovich
1b4525384b Fix more compilation errors on gcc 4.6 2018-02-28 05:09:24 -08:00
Victor Zverovich
6090e51b65 Fix compilation errors on gcc 4.6 2018-02-28 04:49:20 -08:00
Victor Zverovich
0827ec5aa9 Fix compilation errors on gcc 4.6 2018-02-28 04:33:43 -08:00
Victor Zverovich
4d35f94133 Always use fallback string_view to pass format string (#664) 2018-02-24 18:19:30 +00:00
Victor Zverovich
0565d65461 Fix gcc 7.2 issue 2018-02-24 09:29:15 +00:00
Victor Zverovich
f5dc0ed342 Break long lines 2018-02-24 08:39:17 +00:00
Lars Gullik Bjønnes
f45f70af09 Use trailing return type instead of deduction
C++11 does not support deduction of return type.
2018-02-24 08:20:20 +00:00
Lars Gullik Bjønnes
db86e8d5d3 Remove a couple of unused argument names 2018-02-24 08:20:20 +00:00
Lars Gullik Bjønnes
55f5c9f21b Use FMT_NULL instead of 0 is a few more places.
Found with GCC and -Wzero-as-null-pointer-constant
2018-02-24 08:20:20 +00:00
Victor Zverovich
a7ae5666a0 Enable join on msvc 2018-02-19 21:03:51 +00:00
Victor Zverovich
24d249b0b4 Fix formatting of objects convertible to string_view 2018-02-19 20:25:56 +00:00
hubslave
e508e30800 Don't define FMT_LOCALE on OpenBSD
OpenBSD doesn't have strtod_l() (at least under the default
headers), so the class Locale that the macro gates won't compile.
2018-02-19 19:24:33 +00:00
Victor Zverovich
0ee4273b04 Put is_enum check first not to instantiate convert_to_int unnecessarily 2018-02-18 05:47:29 +00:00
Victor Zverovich
8ca3ab2c4c Revert problematic pragma 2018-02-18 05:38:32 +00:00
Victor Zverovich
18ac98700e Fix formatting of objects convertible to std::string 2018-02-17 12:57:18 +00:00
Victor Zverovich
ce4a65ffea Add pointer support to basic_writer 2018-02-17 09:38:46 +00:00
Victor Zverovich
91721caa42 Add detection of wostream operator<< (#650) 2018-02-17 09:03:43 +00:00
Victor Zverovich
1efc15c177 Fix MSVC build 2018-02-16 18:13:54 +00:00
Victor Zverovich
8ed264fcd4 Rename type enum constants to prevent collision with poorly written C libs (#644) 2018-02-16 17:20:33 +00:00
Andrew Gunnerson
7d2723d57c posix.cc: Fix compilation with -fno-exceptions
Signed-off-by: Andrew Gunnerson <andrewgunnerson@gmail.com>
2018-02-15 18:39:36 -08:00
Alex Alabuzhev
24d66c5d65 compilation fix & warnings 2018-02-15 18:37:45 -08:00
Victor Zverovich
229887bd40 Make constexpr remove_prefix gcc version check tighter (#648) 2018-02-14 05:46:41 -08:00
Victor Zverovich
f3f19e762f Update docs 2018-02-11 13:43:16 -08:00
Victor Zverovich
e9fa42acb8 Fix docs and build issues on gcc-4.6 2018-02-11 09:43:54 -08:00
Victor Zverovich
affb35cfb9 Replace using with typedef for compatibility with gcc-4.6 2018-02-11 09:23:47 -08:00
Victor Zverovich
1a4e892765 Move output_range to format.h 2018-02-11 08:36:44 -08:00
Victor Zverovich
522de7b55d Replace using with typedef for compatibility with gcc-4.6 2018-02-11 08:32:02 -08:00
Victor Zverovich
3239c51814 Get rid of generic lambdas 2018-02-11 07:05:14 -08:00
Victor Zverovich
78166ccd36 Get rid of generic lambdas 2018-02-11 06:50:56 -08:00
Victor Zverovich
d8ef8a9e9b Cleanup 2018-02-11 06:24:22 -08:00
Victor Zverovich
61065e1a5c Fix unreachable code warning when signbit returns bool 2018-02-10 07:21:17 -08:00
Victor Zverovich
5096c0fe97 Fix string_view detection 2018-02-10 07:17:29 -08:00
Victor Zverovich
5013c15737 Silence MSVC 2017 constant if expression warning 2018-02-10 06:52:46 -08:00
Victor Zverovich
cdfcee27fb Use allocator_traits if available 2018-02-10 06:51:13 -08:00
Victor Zverovich
6cb68f9496 Fix warnings 2018-02-10 06:28:43 -08:00
Victor Zverovich
0b635c9dc5 Fix handling of fixed enums in clang (#580) 2018-02-10 06:17:42 -08:00
Victor Zverovich
66afd9b33a Fix compilation on gcc 6 2018-02-10 05:16:16 -08:00
Victor Zverovich
67e070fe5a Make format work with C++17 std::string_view (#571) 2018-02-07 08:14:54 -08:00
Victor Zverovich
64599973e9 Enable stream exceptions (#581) 2018-02-07 07:36:15 -08:00
Victor Zverovich
92a250fdb6 Suppress Clang's warning on zero as a null pointer 2018-02-07 07:16:00 -08:00
Victor Zverovich
2f13d41e30 Add to_wstring 2018-02-07 07:08:14 -08:00
Victor Zverovich
1e19ae8348 Workaround a bug in MSVC 2018-02-07 06:31:42 -08:00
Victor Zverovich
3810d7e4d4 Workaround a bug in MSVC 2018-02-04 09:29:50 -08:00
Victor Zverovich
5c7474e1fb Relax constexpr requirements 2018-02-04 08:58:21 -08:00
Victor Zverovich
1f57243b49 Relax constexpr requirements 2018-02-04 08:52:43 -08:00
Victor Zverovich
dc5403612e Conditionally compile constexpr 2018-02-04 08:21:31 -08:00
Victor Zverovich
2582f41e12 Fix ifdefs 2018-02-02 19:16:13 -08:00
Victor Zverovich
bfce29ffef Improve conversion 2018-02-02 18:40:36 -08:00
Victor Zverovich
f164e4c72f Remove old bcc-related comments 2018-02-01 16:49:47 -08:00
Victor Zverovich
8fa9acb8e5 Workaround broken __builtin_clz in clang with MS codegen (#519) 2018-02-01 16:43:16 -08:00
Victor Zverovich
1c7b751d70 Fix handling of implicit conversion to integral types larger than int 2018-02-01 16:42:15 -08:00
Victor Zverovich
08dff3774c Allow compiling and using as DLL in windows #502 2018-01-28 20:50:43 -08:00
Victor Zverovich
c753a2af39 Don't include the world with WIN32_LEAN_AND_MEAN (#503) 2018-01-28 20:26:25 -08:00
Victor Zverovich
768061c85e Fix FormatBuf implementation (#491) 2018-01-28 20:08:51 -08:00
Victor Zverovich
0c136381e3 Move back_insert_range to format.h 2018-01-27 18:56:50 -08:00
Victor Zverovich
5060568f72 %.f should have zero precision, not default precision 2018-01-27 17:56:19 -08:00
Victor Zverovich
f9fa7c405f Add FMT_API and FMT_OVERRIDE where needed 2018-01-27 17:15:14 -08:00
Victor Zverovich
a980d3b46b Add fmt::join to format ranges (#466) 2018-01-27 16:04:45 -08:00
Victor Zverovich
87eab90ea8 Fix missing intrinsic when included from C++/CLI (#457) 2018-01-27 09:25:15 -08:00
Victor Zverovich
bca9de9e68 Return iterator from format_to 2018-01-27 07:03:26 -08:00
Victor Zverovich
a93270fd60 Replace a bunch of craft with type_traits, take 2 2018-01-22 18:56:53 -08:00
Victor Zverovich
21429c8646 Revert "Replace a bunch of craft with type_traits"
This reverts commit e79588d6c1.
2018-01-21 18:53:38 -08:00
Victor Zverovich
0473c48f88 Add std::basic_string allocator support (#441) 2018-01-21 18:21:16 -08:00
Victor Zverovich
e79588d6c1 Replace a bunch of craft with type_traits 2018-01-21 18:11:57 -08:00
Victor Zverovich
3a6c7d0cbd Fix signbit detection (#423) 2018-01-21 16:41:55 -08:00
Victor Zverovich
5e4c34b25a Add version macro FMT_VERSION (#411) 2018-01-21 16:36:22 -08:00
Victor Zverovich
bd8a7e7ea1 More iteratification 2018-01-21 14:30:38 -08:00
Victor Zverovich
e35d41fff5 Add extern templates for format_float (#413) 2018-01-20 19:17:59 -08:00
Victor Zverovich
d8c25a175a Use nullptr if available 2018-01-20 19:11:19 -08:00
Victor Zverovich
229ee34eea Fix compiler warnings 2018-01-20 17:54:06 -08:00
Victor Zverovich
a1e7e4a768 Fix compilation with -fno-exceptions (#402, #405) 2018-01-20 17:10:14 -08:00
codicodi
3f24a38840 Thread-safe time formatting (#396) 2018-01-20 11:35:23 -08:00
Victor Zverovich
f853d94a15 Remove unnecessary fmt/ prefix (#397) 2018-01-20 10:28:10 -08:00
Victor Zverovich
da80005f11 Fix compilation on Cygwin (#388) 2018-01-20 09:52:03 -08:00
Victor Zverovich
72606f2391 Add missing types to counting_iterator 2018-01-20 08:20:18 -08:00
Victor Zverovich
64b349aee2 More iterator support & fmt::count 2018-01-17 22:04:24 -08:00
Victor Zverovich
322736d3bb Add support for arbitrary output iterators 2018-01-15 12:46:44 -08:00
Victor Zverovich
1029119497 Cleanup 2018-01-15 11:37:39 -08:00
Victor Zverovich
c1d137ed5f Add support for nonconiguous iterators 2018-01-15 11:30:53 -08:00
Victor Zverovich
f6fd38bb3a More iterator support 2018-01-15 08:48:37 -08:00
Victor Zverovich
c2fecb9b2a Clean API 2018-01-14 14:15:59 -08:00
Victor Zverovich
9a53a706fc Add support for back_insert_iterator 2018-01-14 13:12:26 -08:00
Victor Zverovich
91ee9c9acd Return iterator from the format method 2018-01-14 11:00:27 -08:00
Victor Zverovich
67928eae28 Don't inherit context from parse_context 2018-01-14 09:27:40 -08:00
Victor Zverovich
217e7c76f1 Pass ranges by value 2018-01-14 08:13:48 -08:00
Victor Zverovich
22994c62f7 Decouple arg_formatter_base from buffer 2018-01-13 15:34:48 -08:00
Victor Zverovich
3a2e89e134 Reduce dependency on buffer 2018-01-13 12:57:27 -08:00
Victor Zverovich
cea3c20747 Give a better error message for function pointers (#633) 2018-01-13 07:02:45 -08:00
Victor Zverovich
232ceabbc3 Workaround an internal compiler error in MSVC 2018-01-13 06:43:03 -08:00
Victor Zverovich
c095445394 Replace buffer with range 2018-01-10 22:41:23 -08:00
Victor Zverovich
c3d6c5fc4c Replace buffer with range 2017-12-30 07:42:56 -08:00
Victor Zverovich
d165d9c483 Decouple locale and buffer 2017-12-26 17:22:07 -08:00
Victor Zverovich
3663414053 Parameterize basic_writer on buffer type 2017-12-26 09:00:22 -08:00
Victor Zverovich
6f2769d0b4 Revert "Added support for format string containing '\0' in _format udl (#619) (#620)"
This reverts commit 3aaa25fa70 for
reasons discussed in #622.
2017-12-23 08:00:51 -08:00
Victor Zverovich
5f1c73db7d Shorten a comment in locale.h 2017-12-23 08:00:38 -08:00
Victor Zverovich
941663d038 Merge ostream.cc into ostream.h 2017-12-17 09:33:56 -08:00
Victor Zverovich
955062da2e Merge printf.cc into printf.h 2017-12-17 08:36:19 -08:00
Victor Zverovich
ccaae0c019 Refer to jeaiii project 2017-12-10 16:09:35 -08:00
Victor Zverovich
e37151021e Add a integer formatter based on jeaiii 2017-12-10 16:05:51 -08:00
Victor Zverovich
61f296e30c Move FMT_HAS_BUILTIN to format.h 2017-12-09 08:56:44 -08:00
Victor Zverovich
ce801c9095 Remove dependency on <vector> and <array> 2017-12-09 08:48:30 -08:00
Victor Zverovich
41fc29907a Merge branch 'std' of github.com:fmtlib/fmt into std 2017-12-09 08:16:34 -08:00
Victor Zverovich
971fb584c3 Allow mixing named and automatic arguments 2017-12-09 08:15:13 -08:00
Abdó Roig-Maranges
af0f21da0f add missing inline in header-only mode (#626) 2017-12-09 07:50:53 -08:00
Victor Zverovich
7cea163809 numeric -> arithmetic 2017-12-09 06:19:15 -08:00