Commit Graph

336 Commits

Author SHA1 Message Date
Jonathan Müller
c6d9730ddb
Fix sign conversion warnings (#790) 2018-06-27 14:31:20 +02:00
Victor Zverovich
2e95823ef7 Move new color support to format.h and mark old as deprecated 2018-06-24 06:39:22 -07:00
Victor Zverovich
ab2d88ca8e Make format_to work with basic_memory_buffer (#776) 2018-06-23 08:29:26 -07:00
Victor Zverovich
3abd036c47 Fix compilation on gcc 4 2018-06-23 07:18:59 -07:00
Victor Zverovich
c2f3805488 Add vformat_to_n (#769) 2018-06-23 07:03:00 -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
gabime
c2fbadb9cf Fixed issue #779 2018-06-12 07:39:44 +02:00
Remotion
47268ecd80 Fixed GCC version test 2018-06-10 20:35:38 +02:00
Victor Zverovich
9ff3b6af2e Fix handling of compile-time strings when including ostream.h (#768) 2018-06-10 19:05:27 +02:00
Victor Zverovich
e3707ef14b Document that file should be in wide-oriented mode for wide print 2018-06-09 09:12:49 +02:00
Victor Zverovich
45fa4ee949 Merge branch 'master' of github.com:fmtlib/fmt 2018-06-08 21:43:56 +02:00
Remotion
9c07b37fff Using enum class now.
Renamed from hex to color.
Changed colr names to snake case.
2018-06-08 21:40:35 +02:00
Remotion
5b5886a993 Fixed line length. 2018-06-08 19:48:41 +02:00
Remotion
d2bfee13e2 Added quotes for strings in ranges and tuple likes. 2018-06-08 19:48:41 +02:00
Remotion
aff6e45e14 Added support for rgb color output. 2018-06-07 22:49:16 +02:00
Victor Zverovich
1b8a7f8fa0 Fix postincrement in truncating and counting iterators 2018-06-07 20:20:36 +02:00
Victor Zverovich
4bc26f0a7b Merge branch 'master' of github.com:fmtlib/fmt 2018-06-07 18:42:30 +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
Dror Levin
cd5b5670ba Make is_range and is_tuple_like public API, fix #751 2018-06-06 21:49:14 +02:00
Victor Zverovich
6322b47e60 Minor cleanup 2018-06-06 16:51:35 +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
47d147b65d Simplify the nvcc warning fix 2018-06-04 21:27:20 +02:00
Victor Zverovich
911a75114b Fix nvcc warnings (#752) 2018-06-04 21:00:28 +02:00
Victor Zverovich
252f11f85d Fix a bogus MSVC warning about unreachable code, take 2 2018-06-04 18:17:55 +02:00
Victor Zverovich
81d5663825 Fix more bogus MSVC warnings about unreachable code (#748) 2018-06-04 06:10:52 +02:00
Victor Zverovich
68f0ac8271 Fix a bogus MSVC warning about unreachable code 2018-06-03 08:03:56 +02:00
Victor Zverovich
b60a5c5d49 Improve floating-point formatting 2018-05-28 20:16:30 -07:00
Victor Zverovich
8dc2360b11 Fix a comment 2018-05-28 17:21:39 -07:00
Victor Zverovich
4e4b8570e5 Implement simple version of Grisu 2018-05-28 11:25:07 -07:00
Victor Zverovich
5c32aa411c Workaround a bug in MSVC 2018-05-27 11:18:27 -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
e282d963fe Bump version 2018-05-26 09:46:59 -07:00
Victor Zverovich
e2cd521b8f Fix incorrect call to on_align in '{:}=' (#750) 2018-05-26 09:23:09 -07:00
Victor Zverovich
fba352a92a Don't use UDL templates on Intel C++ compiler (#742) 2018-05-26 08:07:45 -07:00
Victor Zverovich
147807c911 Detect integer_sequence support on MSVC 2018-05-21 20:30:58 -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
936aba5f90 Fix compilation errors on gcc 4.4 2018-05-20 07:42:09 -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
Michael Winterberg
550ef1d29d MSVC improvements and data truncation cleanup.
MSVC is timid about evaluating constexpr functions unless it has to, so the "TYPES" variables end up in read-write memory even though the optimizer removes the initializer. Making TYPES constexpr causes MSVC to try harder to initialize these variables at compile time, which also ends up completely removing the (named) variable from the final compiled binary.
Fixed a data truncation warning being reported in ostream-test.
2018-05-17 18:46:31 -07:00
Victor Zverovich
728e4f5a8d Fix docs 2018-05-16 08:26:55 -07:00
Victor Zverovich
8c2557710d Update docs and changelog 2018-05-16 07:58:53 -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
ad23270ec7 Document to_wstring 2018-05-13 09:11:29 -07:00
Victor Zverovich
989378930a Detect inline namespaces on gcc 2018-05-13 08:53:04 -07:00
Victor Zverovich
6a1df3bd05 Fix docs 2018-05-12 12:57:16 -07:00
Victor Zverovich
838400d29b Add inline namespace fmt::v5 2018-05-12 11:02:15 -07:00
Victor Zverovich
46c374a8a9 Fix compilation with new gcc and -std=c++11 (#734) 2018-05-09 20:58:05 -07:00
Elias Kosunen
a4e4f74530 Fix a -Wundef when FMT_GCC_VERSION < 600 2018-05-09 06:09:25 -07:00
Victor Zverovich
7d3de49715 Implement double to fp conversion 2018-05-06 13:37:49 -07:00
Victor Zverovich
a4c7d99f70 Add bit_cast 2018-05-06 11:52:51 -07:00
Elias Kosunen
0adccaefb6 Fix a -Wundef of _LIBCPP_VERSION 2018-05-05 07:43:22 -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
Daniela Engert
6cd666100f remove trailing spaces.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-05-01 07:10:05 -07:00
Victor Zverovich
fe19c266ce Move format_string to fmt namespace for ADL 2018-04-29 08:35:20 -07:00
Victor Zverovich
2768af2388 Add cached powers of 10 2018-04-29 06:33:05 -07:00
DanielaE
0efc8a1808 Fix compiler warning about narrowing
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-04-27 06:41:43 -07:00
Victor Zverovich
221b08fd8f Merge branch 'master' of github.com:fmtlib/fmt 2018-04-22 09:16:34 -07:00
Victor Zverovich
fa9066fe3e context_base::begin -> out 2018-04-22 09:16:32 -07:00
Elias Kosunen
90ff31b38e Fix a -Wundef warning on clang
Resolves #715
2018-04-22 09:13:55 -07:00
Victor Zverovich
b1f68c43b5 Merge branch 'master' of github.com:fmtlib/fmt 2018-04-21 19:21:41 -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
Daniela Engert
2ae41242a5 allow time formatting with wchar_t contexts
change total specialization of 'struct formatter<std::tm>' into partial specialization 'template <typename Char> struct formatter<std::tm, Char>', backed by matching 'strftime'-like overloads
2018-04-18 18:55:49 -07:00
Victor Zverovich
e80aba1c2b Remove format_float stub 2018-04-14 12:40:53 -07:00
Victor Zverovich
7b8cb3135a Make context_base::args() public 2018-04-14 12:40:26 -07:00
Christian Parpart
48ae0506de fixes MSVC compiler warning bloat (Visual Studio 2017, latest updates) 2018-04-11 06:53:27 -07:00
Victor Zverovich
096c4051b2 Simplify char_traits 2018-04-08 13:38:12 -07:00
Victor Zverovich
7610c5362a Remove unused macro 2018-04-08 11:54:22 -07:00
Victor Zverovich
7d28674d3a make_args -> make_format_args 2018-04-08 07:21:26 -07:00
Victor Zverovich
9382b76f2a context_t -> format_context_t 2018-04-08 07:09:34 -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
44cc034651 Relax string_view requirements 2018-04-07 16:18:01 -07:00
Victor Zverovich
0829cab8f2 Remove from_checked 2018-04-07 15:21:48 -07:00
Victor Zverovich
cb7bbc6224 Improve checked iterator support 2018-04-07 15:11:34 -07:00
Victor Zverovich
5079f924d6 Fix a narrowing warning 2018-04-07 14:42:09 -07:00
Victor Zverovich
5859e58ba1 Fix msvc warnings 2018-04-04 21:11:31 -07:00
Victor Zverovich
9d4efd7aa2 Iterator Wars VI: Return of the checked iterator 2018-04-04 20:15: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
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