Commit Graph

1047 Commits

Author SHA1 Message Date
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
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
e8efdef8de Avoid extra copy 2018-10-17 08:19:46 -07:00
Victor Zverovich
50b18a3c10 Integrate Grisu 2018-10-14 14:33:25 -07:00
Victor Zverovich
ddd7caf38e Fix locale-dependent formatting (#905) 2018-10-13 11:15:41 -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
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
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
3f4cfa6c60 Implement UTF-8 string support 2018-09-30 15:45:58 -07:00
Victor Zverovich
5bced12421 Parameterize more functions on string type 2018-09-30 08:02:19 -07:00
Victor Zverovich
e4fea22d15 Make char8_t a strongly-typed enum 2018-09-30 07:11:37 -07:00
Guillaume Fraux
e864acfdbd Fix compilation with intel compilers (ICC/ICPC) v14.0 2018-09-27 07:11:23 -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
ff6e46ed97 More cleanup 2018-09-22 16:00:34 -07:00
Victor Zverovich
ec0cdc46f6 Workaround Windows slowness 2018-09-21 17:11:57 -07:00
Victor Zverovich
cb122a4d03 Fix format_to formatting to wmemory_buffer 2018-09-21 09:48:21 -07:00
Victor Zverovich
dc69cc45d2 Clean tests 2018-09-21 09:48:21 -07:00
Victor Zverovich
3f4984fb36 Clean core-test and fix linkage errors on older gcc 2018-09-19 12:24:38 -07:00
Victor Zverovich
bc26fbf1b0 Move experimental color API to fmt/color.h 2018-09-12 09:04:26 -07:00
Victor Zverovich
7110b46076 Optimize default formatting 2018-09-12 08:45:14 -07:00
Victor Zverovich
918bb1ce8f Optimize argument capture 2018-09-08 15:29:32 -07:00
Victor Zverovich
a3ba6b4f62 Disable the fmt(...) macro by default (#853) 2018-09-08 09:55:41 -07:00
Victor Zverovich
1489d3b7fa Implement exponential notation 2018-08-29 18:55:57 -07:00
Victor Zverovich
dd8c5ce442 Implement more FP formatting options 2018-08-29 09:34:57 -07:00
Victor Zverovich
46484da711 Fix a warning 2018-08-29 07:00:24 -07:00
Victor Zverovich
569ac91e0b Implement Grisu boundary computation 2018-08-25 11:39:38 -07:00
Victor Zverovich
a11eb3a090 Workaround various icc bugs (#822) 2018-08-22 09:07:17 -07:00
Victor Zverovich
987514761e Make convert_to_int public (#818) 2018-08-22 07:40:06 -07:00
Victor Zverovich
8b9fb9fb7e Fix ambiguous instantiation with formatter in fmt/ostream.h (#830) 2018-08-11 09:13:54 -07:00
Victor Zverovich
c68bab7014 Remove broken fmt::internal::format_enum (#818) 2018-08-01 07:11:53 -07:00
Victor Zverovich
8db14efa84 util-test -> core-test and minor cleanup 2018-07-22 17:05:23 -07:00
Victor Zverovich
c178ab440f Remove FMT_USE_RVALUE_REFERENCES 2018-07-22 15:07:53 -07:00
Victor Zverovich
5befe6584d Remove fmt/folly.h and clean up core API 2018-07-22 14:42:25 -07:00
Victor Zverovich
2a4e948864 Add UTF-8 types 2018-07-22 06:36:21 -07:00
MikePopoloski
d778bded95 Make line in tests fit within 80chars 2018-07-20 17:07:23 -07:00
MikePopoloski
b1d10a2884 Add support for dynamic arg sets
This allows construction of basic_format_args from a dynamic set of arguments. The syntax is a little clunky and could probably be improved but this at least enables the functionality.
2018-07-20 17:07:23 -07:00
Victor Zverovich
cf2719bd12 Add support for types explicitly convertible to wstring_view 2018-07-18 19:12:10 -07:00
Victor Zverovich
50584f42b4 Test formatting of an object with templated conversion to string-like 2018-07-18 16:24:46 -07:00
Victor Zverovich
73bed45b7a Add support for types explicitly convertible to fmt::string_view 2018-07-18 14:42:26 -07:00
Victor Zverovich
e7e9578ed4 Optimize format string parsing 2018-07-14 14:27:56 -07:00
Victor Zverovich
e0f6a2f8be Add a formatter for folly::StringPiece 2018-07-14 07:31:47 -07:00
Marek Kurdej
2a4cd6d05e Fix the returned value of format_to_n with user-defined types having operator<<. 2018-07-10 14:01:12 -07:00
Victor Zverovich
f66ba6508a Optimize format string parsing 2018-07-08 10:15:24 -07:00
Victor Zverovich
f21268aa72 Revert "Optimize format string parsing" because of a bug in MSVC
https://godbolt.org/g/rpiDgh

This reverts commit f9e9bf0231.
2018-07-08 08:08:50 -07:00
Victor Zverovich
f9e9bf0231 Optimize format string parsing 2018-07-07 16:50:22 -07:00
Victor Zverovich
479ee2a8c6 Fix MSVC build, take 2 2018-07-04 14:24:07 -07:00
Victor Zverovich
c04fb91b03 Fix handling of user-defined types in format_to (#793) 2018-07-04 07:40:56 -07:00
Victor Zverovich
ab2d88ca8e Make format_to work with basic_memory_buffer (#776) 2018-06-23 08:29:26 -07:00
Remotion
ce500635c7 Renamed enum color to colors.
Added enum colors conversion to rgb struct.
Added colors_test.cpp.

Removed print_colored.
Renamed enum colors back to color.

Removed unnecessary inline keyword.
Removed print_rgb.
2018-06-23 06:14:44 -07:00
Victor Zverovich
0508bbc7ae Add wchar_t overload of format_to_n (#764) 2018-06-13 08:24:32 +02:00
Victor Zverovich
9ff3b6af2e Fix handling of compile-time strings when including ostream.h (#768) 2018-06-10 19:05:27 +02:00
Remotion
d2bfee13e2 Added quotes for strings in ranges and tuple likes. 2018-06-08 19:48:41 +02:00
Victor Zverovich
1b8a7f8fa0 Fix postincrement in truncating and counting iterators 2018-06-07 20:20:36 +02:00
Victor Zverovich
fc6e0fe992 Fix FP formatting to a non-back_insert_iterator with sign & numeric alignment (#756) 2018-06-07 18:41:40 +02:00
Elias Kosunen
691a7a91a1 Add more compilers to CI and increase FMT_PEDANTIC warning levels (#736)
* Add a _lot_ more warnings to FMT_PEDANTIC
Fix these warnings

* Add more compilers to CI
Fix (some) of the compiler errors with them

* Enable -Werror on CI
Increase warning level on MSVC when compiling with FMT_PEDANTIC

* Add VS 2013 and 2015 to Appveyor

* Fix Appveyor tests
Formatting

* Implement requested changes
Fix some of the MSVC warnings
Implement C++11 integer_sequence

* Reintroduce appveyor-build.py

* Remove ranges-test from tests

* Remove (some) explicit warning suppressions
Fix C++ standard setting in CI

* Remove (some) explicit warning suppressions
Fix C++ standard setting in CI

* Fix test builds with C++11

* Enable pedantic warnings on tests

* Fix warnings from edits to master

* Cleanups

* Add C++11 support to ranges.h
Re-enable ranges-test
Fix a Visual Studio error about function not returning a value in printf.h
Fix a bug in .travis.yml
2018-06-06 15:57:59 +02:00
Victor Zverovich
d5c462596b Fix formatting of more than 15 named arguments (#754) 2018-06-05 08:32:28 +02:00
Victor Zverovich
4027557958 Fix tests on 64-bit MSVC 2018-05-27 11:38:53 -07:00
Victor Zverovich
468c243ca8 Add a function to get cached power of 10 2018-05-27 10:57:26 -07:00
Victor Zverovich
2f257b7291 Implement normalization and simplify power table 2018-05-27 08:04:30 -07:00
Victor Zverovich
e2cd521b8f Fix incorrect call to on_align in '{:}=' (#750) 2018-05-26 09:23:09 -07:00
Victor Zverovich
5ad54256c5 Fix a conflict between fmt::join and fmt/ostream.h (#744) 2018-05-21 20:21:06 -07:00
Victor Zverovich
6ebc1a967d Merge locale.h into format-inl.h 2018-05-20 17:16:34 -07:00
Victor Zverovich
edd5f1445d Fix compilation errors on gcc 4.4 2018-05-20 09:09:03 -07:00
Victor Zverovich
b76bb79613 Improve naming consistency 2018-05-19 10:32:53 -07:00
Victor Zverovich
69823bf852 Improve naming consistency 2018-05-19 08:59:37 -07:00
Victor Zverovich
d940fa679c Disable unsafe implicit conversion to std::string (#729) 2018-05-19 07:14:27 -07:00
Remotion
e3f7f3a2e9 Add support for ranges, containers and tuple-like types in fmt/ranges.h 2018-05-13 13:28:11 -07:00
Victor Zverovich
838400d29b Add inline namespace fmt::v5 2018-05-12 11:02:15 -07:00
Dan McGregor
edbbf7ce6c Fix FreeBSD 12
FreeBSD 12 changed the type of freelocale to the type defined by
POSIX. Check the FreeBSD version when building for FreeBSD.
2018-05-09 06:10:37 -07:00
Victor Zverovich
a4c7d99f70 Add bit_cast 2018-05-06 11:52:51 -07:00
Daniela Engert
2570f1afdc Provide more overloads for the wide string flavour
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-05-05 07:31:44 -07:00
Michael Winterberg
ca31ca13f1 Fixed arg_formatter_base::write_pointer to not mutate the format specs.
This fixes cases where arg_formatters are reused, like with arg_join.
2018-05-01 07:12:27 -07:00
Victor Zverovich
fa9066fe3e context_base::begin -> out 2018-04-22 09:16:32 -07:00
Victor Zverovich
cd90097ca4 Implement handmade FP 2018-04-21 17:26:24 -07:00
Victor Zverovich
822eccc3b8 Sync API with standards proposal 2018-04-21 14:29:24 -07:00
Victor Zverovich
7d28674d3a make_args -> make_format_args 2018-04-08 07:21:26 -07:00
Victor Zverovich
fd0b07a75a (w)context -> (w)format_context 2018-04-08 07:03:44 -07:00
Victor Zverovich
26aa34f319 basic_context -> basic_format_context 2018-04-08 06:45:21 -07:00
Victor Zverovich
5859e58ba1 Fix msvc warnings 2018-04-04 21:11:31 -07:00
Victor Zverovich
1e747f603f Fix msvc warnings 2018-04-04 20:57:02 -07:00
Victor Zverovich
23759b2688 basic_arg -> basic_format_arg, arg_store -> format_arg_store 2018-04-04 07:38:21 -07:00
Victor Zverovich
e8e006f4e7 Fix compile checks for mixing narrow and wide strings (#690) 2018-03-30 09:29:47 -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
Victor Zverovich
8e10d404db Fix compile tests 2018-03-27 07:39:03 -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
3da71d51e0 Move source files to the src directory 2018-03-21 07:50:59 -07:00
Victor Zverovich
2e21e7d1f1 Fix util-test 2018-03-13 22:20:06 -04: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
c37c4c437e Fix find-package-test 2018-03-13 14:13:39 -04:00
Mario Werner
6d21fc43b9 add alias targets with fmt namespace
For the consumer it should not matter if fmt has been added to the
project as subdirectory or via find_package. With the alias targets
the library can be always imported via fmt::fmt.
2018-03-13 13:51:48 -04:00
Victor Zverovich
7db0e94b9e Fix handling of numeric alignment with no width (#675) 2018-03-11 21:04:42 -04:00
Victor Zverovich
daf650c49a Disallow formatting of multibyte strings into a wide buffer (#606) 2018-03-10 06:46:41 -08:00
Victor Zverovich
80e57c7a3d Update to new naming conventions 2018-03-07 07:36:13 -08:00
Victor Zverovich
f1ede6380b Make inline_buffer_size public and update docs 2018-03-04 10:33:42 -08:00
Victor Zverovich
86a9bc8291 Cleanup 2018-03-04 09:16:51 -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
81074c7048 Fix more compilation errors on gcc 4.6 2018-02-28 05:23:25 -08:00
Victor Zverovich
1b4525384b Fix more compilation errors on gcc 4.6 2018-02-28 05:09:24 -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
Lars Gullik Bjønnes
ea06f021f8 test: comment out one FormatStringErrors constexpr test
GCC 7.3 complains that this is not a compile time constant.

test/format-test.cc: In member function ‘virtual void FormatTest_FormatStringErrors_Test::TestBody()’:
test/format-test.cc:1919:3: error: non-constant condition for static assertion
   static_assert(test_error<__VA_ARGS__>(fmt, error), "")
   ^
test/format-test.cc:1924:3: note: in expansion of macro ‘EXPECT_ERROR’
   EXPECT_ERROR("{0:s", "unknown format specifier", Date);
   ^~~~~~~~~~~~
2018-02-24 08:20:20 +00:00
Lars Gullik Bjønnes
5b49177352 test: Initialize some local variables
GCC 7.3 complains about uninitialized varaibles in constexpr context.
2018-02-24 08:20:20 +00:00
Victor Zverovich
24d249b0b4 Fix formatting of objects convertible to string_view 2018-02-19 20:25:56 +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
8ed264fcd4 Rename type enum constants to prevent collision with poorly written C libs (#644) 2018-02-16 17:20:33 +00:00
Victor Zverovich
affb35cfb9 Replace using with typedef for compatibility with gcc-4.6 2018-02-11 09:23:47 -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
d8ef8a9e9b Cleanup 2018-02-11 06:24:22 -08:00
Victor Zverovich
b00053247c Merge the std branch 2018-02-10 07:38:27 -08:00
Victor Zverovich
cdfcee27fb Use allocator_traits if available 2018-02-10 06:51:13 -08:00
Victor Zverovich
0b635c9dc5 Fix handling of fixed enums in clang (#580) 2018-02-10 06:17:42 -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
2f13d41e30 Add to_wstring 2018-02-07 07:08:14 -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
5d8ba816de Fix a segfault in test on glibc 2.26 #551 2018-02-02 19:34:08 -08:00
Victor Zverovich
8cf30aa2be Fix segfault on complex pointer formatting (#642) 2018-02-01 21:49:03 -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
5060568f72 %.f should have zero precision, not default precision 2018-01-27 17:56:19 -08:00
Victor Zverovich
a980d3b46b Add fmt::join to format ranges (#466) 2018-01-27 16:04:45 -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
72d9fffd78 Fix test compilation for FreeBSD (#433) 2018-01-21 18:18:05 -08:00
Victor Zverovich
e79588d6c1 Replace a bunch of craft with type_traits 2018-01-21 18:11:57 -08:00
Victor Zverovich
bd8a7e7ea1 More iteratification 2018-01-21 14:30:38 -08:00
codicodi
3f24a38840 Thread-safe time formatting (#396) 2018-01-20 11:35:23 -08:00
Victor Zverovich
6822466aa3 Handle nested braces in join (#638) 2018-01-20 06:26:22 -08:00
Victor Zverovich
64b349aee2 More iterator support & fmt::count 2018-01-17 22:04:24 -08:00
Victor Zverovich
e3b69efbe1 Suppress msvc warnings in gmock 2018-01-17 05:46:14 -08:00
Victor Zverovich
322736d3bb Add support for arbitrary output iterators 2018-01-15 12:46:44 -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
00f1450d9a Update tesmplate parameter names 2018-01-13 14:57:43 -08:00
Victor Zverovich
3a2e89e134 Reduce dependency on buffer 2018-01-13 12:57:27 -08:00
Victor Zverovich
c095445394 Replace buffer with range 2018-01-10 22:41:23 -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
955062da2e Merge printf.cc into printf.h 2017-12-17 08:36:19 -08:00
Virgilio Alexandre Fornazin
5705bf1c71 Added support for pre-c++17 experimental string_view (#607)
Added support for pre-c++17 experimental string_view
2017-12-16 09:03:11 -08:00
Victor Zverovich
971fb584c3 Allow mixing named and automatic arguments 2017-12-09 08:15:13 -08:00
Victor Zverovich
94edb1a71c Add a lightweight header for the core API 2017-12-06 07:42:42 -08:00
Artem Golubikhin
3aaa25fa70 Added support for format string containing '\0' in _format udl (#619) (#620)
Added support for strings containing '\0' in udl (#619)
2017-12-06 06:21:34 -08:00
Victor Zverovich
7f351dec27 Decouple <locale> for better compile times 2017-12-03 09:51:59 -08:00
Victor Zverovich
81bd9e8ea3 args -> format_args 2017-12-03 08:00:22 -08:00
Victor Zverovich
10e70a06c9 Improve handling of custom arguments 2017-12-02 09:44:48 -08:00
Victor Zverovich
e0243000de arg_index -> arg_id 2017-11-26 10:05:49 -08:00
Victor Zverovich
f03a35a679 Check string specs at compile time 2017-11-24 09:54:28 -08:00
Victor Zverovich
e9da574147 Check char specs at compile time 2017-11-24 07:54:22 -08:00
Victor Zverovich
b25a029284 Check pointer type specs are compile time 2017-11-23 10:12:23 -08:00
Victor Zverovich
c8a9d902dd Check floating-point type specifiers 2017-11-23 09:14:37 -08:00
Victor Zverovich
6570dc3122 Disallow formatting of multibyte strings into a wide buffer (#606) 2017-11-23 07:23:07 -08:00
Victor Zverovich
3851994ab0 Fix yet another internal compiler error in MSVC 2017-11-19 09:06:49 -08:00
Victor Zverovich
44e186512b Refactor parse context and fix warnings 2017-11-19 08:49:58 -08:00
Victor Zverovich
e7e270f511 Test error on invalid type spec and remove unused alias 2017-11-19 08:25:34 -08:00
Victor Zverovich
c523dd584f Use error handler to report errors 2017-11-19 07:36:01 -08:00
Victor Zverovich
5a32e64b05 More tests 2017-11-19 07:03:12 -08:00
Victor Zverovich
dc104cbaaa Workaround internal compiler errors in MSVC 2017-11-18 09:05:05 -08:00
Victor Zverovich
39411504a5 More tests 2017-11-18 08:16:59 -08:00
Victor Zverovich
62af25dca8 Workaround yet another MSVC internal error 2017-11-18 06:31:47 -08:00
Victor Zverovich
594bd8feba More tests 2017-11-16 06:55:49 -08:00
Victor Zverovich
f2b52bba05 More tests 2017-11-15 07:06:03 -08:00
Victor Zverovich
dfdb1adea5 More tests 2017-11-12 10:03:39 -08:00
Victor Zverovich
7967c2f874 Disable test that triggers an MSVC bug 2017-11-12 09:47:15 -08:00
Victor Zverovich
18a0b94b0e Fix overflow check 2017-11-12 09:25:28 -08:00
Victor Zverovich
686ff942af Fix compile-time parsing and add more tests 2017-11-11 11:40:56 -08:00
Victor Zverovich
5b95b5d77c Test compile-time errors 2017-11-11 10:28:05 -08:00
Victor Zverovich
246bdafc74 Add FMT_STRING macro for compile-time strings 2017-11-11 07:39:12 -08:00
Victor Zverovich
e805543341 Remove FMT_USE_VARIADIC_TEMPLATES 2017-11-11 07:02:58 -08:00
Victor Zverovich
a03842b0d5 More compile-time checks 2017-11-05 13:26:19 -08:00
Victor Zverovich
8ca6e76dbc Detect user-defined literal templates 2017-11-04 08:23:24 -07:00
Victor Zverovich
db9ffa1405 Make parse_format_string constexpr 2017-10-29 07:32:14 -07:00
Victor Zverovich
d29c7c3aca Workaround a bug in MSVC 2017-10-25 07:37:50 -07:00
Victor Zverovich
aadb38a5e6 Make specs_checker constexpr 2017-10-24 07:46:30 -07:00
Victor Zverovich
529d88ce95 Make dynamic_format_specs construction constexpr 2017-10-22 10:19:09 -07:00
Victor Zverovich
d2f2a8b0ca constexpr support of dynamic width and precision 2017-10-22 09:32:46 -07:00
Ludek Vodicka
7a9c1ba190 FMT_VARIADIC_CONST - Support for const variadic methods (#591)
FMT_VARIADIC_CONST - Support for const variadic methods
2017-10-22 08:55:40 -07:00
Victor Zverovich
6b3840b73c Make format_specs construction constexpr 2017-10-22 08:18:26 -07:00
Victor Zverovich
91014f0171 Naming conventions 2017-10-22 06:43:41 -07:00
Victor Zverovich
0ebdf41efa Fix compile-test 2017-10-21 08:17:00 -07:00
Victor Zverovich
170f5c671f Move headers to include/fmt 2017-10-21 07:38:49 -07:00
Victor Zverovich
b83241ff4d Make format spec parsing constexpr 2017-10-19 07:36:46 -07:00
Michael Winterberg
324415c036 Use allocator_traits if available.
This is to avoid using functionality deprecated in C++17.
2017-10-18 06:11:15 -07:00
Victor Zverovich
1b5ccf6c13 Make parse_arg_id constexpr 2017-10-15 16:54:47 -07:00
Victor Zverovich
9328a074b1 Fix handling of fixed enums in clang (#580) 2017-10-14 08:47:08 -07:00
Victor Zverovich
d5e918b61f Detect C++14 compiler support 2017-09-28 08:57:54 -07:00
Victor Zverovich
643fb0662e Check for argument indexing switch 2017-09-27 21:18:37 -07:00
Victor Zverovich
d45544d14e Fix width handling in dynamic formatting 2017-09-27 19:04:15 -07:00
Mário Feroldi
2a619d96dd Make format work with C++17 std::string_view (#571)
Tests for C++17 std::string_view
2017-09-20 06:21:11 -07:00
Victor Zverovich
8cbf544733 Add parse context 2017-09-17 09:05:01 -07:00
Victor Zverovich
ec4f5175f1 Replace Range with ParseContext in parse() 2017-09-16 17:07:03 -07:00
Victor Zverovich
0cda806dcc Fix compile tests 2017-09-08 11:25:49 -07:00
Victor Zverovich
fced79b0ee Get rid of old compat macros 2017-09-08 08:26:05 -07:00
Victor Zverovich
c18a4041f9 Remove conditional and to_iterator 2017-09-04 13:56:14 -07:00
Victor Zverovich
af00e4f9c9 Remove printf_arg_formatter from format.h and cleanup 2017-09-04 12:28:53 -07:00
Victor Zverovich
0fbd846561 Replace fmt::internal::make_unsigned with std::make_unsigned 2017-09-04 11:41:15 -07:00
Victor Zverovich
8a2bc0ab1b Add nullptr support 2017-09-04 11:10:08 -07:00
Victor Zverovich
80505995d0 Allow delayed type checking 2017-09-04 09:33:22 -07:00
Victor Zverovich
3e75d3e001 Fix handling of types convertible to int 2017-09-02 07:08:19 -07:00
Alex Alabuzhev
89654cd127 to_wstring added 2017-08-27 18:52:57 +02:00
Victor Zverovich
47c84d7974 Move part of write API (spec factories) to a separate header 2017-08-27 09:08:44 -07:00
Victor Zverovich
20168147dd Add ptr, a helper function for pointer formatting 2017-08-27 08:41:28 -07:00
Victor Zverovich
27ad6cee82 Use standard enable_if 2017-08-26 10:41:58 -07:00
Victor Zverovich
64681739fd Fix a warning 2017-08-26 09:32:37 -07:00
Victor Zverovich
016acebb56 Remove legacy code 2017-08-26 09:09:43 -07:00
Victor Zverovich
466386d5cd Suppress a warning in gmock 2017-08-26 08:50:09 -07:00
Victor Zverovich
5e0562ab51 Separate parsing and formatting 2017-08-13 13:09:02 -07:00
Victor Zverovich
032c83807f Fix a segfault in test on glibc 2.26 #551, take 2 2017-08-10 09:27:06 -07:00
Victor Zverovich
6655e804c4 Fix a segfault in test on glibc 2.26 #551 2017-08-06 20:18:04 -07:00
Victor Zverovich
1102d46508 Make format spec parsing context-independent 2017-07-30 08:58:24 -07:00
Victor Zverovich
45911770c5 Separate parsing and formatting in extension API 2017-07-29 07:50:16 -07:00
Victor Zverovich
2f4f49fd60 Switch from cstring_view to string_view 2017-07-22 08:24:37 -07:00
Victor Zverovich
d16582a038 Move printf-related code to printf.cc 2017-07-15 09:46:18 -04:00
Mario Werner
ac5484c4e7 add alias targets with fmt namespace
For the consumer it should not matter if fmt has been added to the
project as subdirectory or via find_package. With the alias targets
the library can be always imported via fmt::fmt.
2017-05-25 14:36:16 +03:00
Mario Werner
746adc5e71 added new namespace to the header only target in the find package test 2017-05-25 14:36:16 +03:00
Bjoern Thiel
048d2aec27 CMake imported targets should be namespaced 2017-05-21 14:17:12 +03:00
Victor Zverovich
07ed421521 Fix handling of implicit conversion to integral types larger than int (#507) 2017-05-06 10:23:20 -07:00
Victor Zverovich
dcfd40a1b8 Revert #456
Revert #456 because it causes issues for known types (#495) and is not C++98-compatible.
2017-05-06 08:36:54 -07:00
Andreas Schönle
79f11dbaa7 Allow compiling and using as DLL in windows (#502)
* printf.h fixed to compile clean - need to check whether this is the right
thing to do

* fix warnings and errors in test compiles with BUILD_SHARED_LIBS

* did requested changes and added one change to allow all tests to succeed
in windows DLL
2017-05-05 14:58:09 +02:00
effzeh
73ca9948fe Fix FormatBuf implementation (#491)
Fixes #491 (and probably #480) Before, the put-area of the custom streambuf
implementation was (sometimes) incorrectly extended beyond the writeable buffer.
The new implementation is in some cases not as efficient as the old, but avoids
to write into uninitialized memory.
2017-04-08 09:07:33 -07:00
Arthur Danskin
cbac016cce %.f should have zero precision, not default precision 2017-04-08 07:18:10 -07:00
Victor Zverovich
12252152ac CStringRef -> cstring_view 2017-03-26 15:13:10 -07:00
Victor Zverovich
32ec13f149 Switch to C++ locale 2017-03-25 08:20:06 -07:00
Victor Zverovich
b4f4b7e21a Clean the buffer API (#477) 2017-03-12 09:48:21 -07:00
Victor Zverovich
f423e46835 Replace clear() with resize(0) and data_ -> store_ 2017-03-11 08:30:15 -08:00
Victor Zverovich
7175bd8ae6 Fix error on MinGW 2017-03-09 06:09:43 -08:00
Victor Zverovich
7258d1b8f3 Fix tests 2017-03-08 08:08:08 -08:00
Victor Zverovich
3610f34c70 Fix windows build 2017-03-04 07:10:54 -08:00
Victor Zverovich
6f8006c2ce Add printf overloads that takes a writer (#476) 2017-02-25 09:58:42 -08:00
Victor Zverovich
db0d54f855 Fix error on MinGW 2017-02-25 09:00:56 -08:00
Victor Zverovich
c333dca065 Follow standard naming conventions 2017-02-21 06:56:26 -08:00
Victor Zverovich
6a2ff287b2 Follow standard naming conventions 2017-02-19 08:05:41 -08:00
Victor Zverovich
eedfd07f8b internal::MemoryBuffer -> basic_memory_buffer 2017-02-18 09:13:12 -08:00