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
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
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
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
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
Victor Zverovich
f5480635c0
visit -> visit_format_arg
2018-10-05 07:15:41 -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
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
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
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
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
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
Victor Zverovich
cb122a4d03
Fix format_to formatting to wmemory_buffer
2018-09-21 09:48:21 -07:00
Candy Gumdrop
9d8021f0d6
Add checks for NVIDIA's CUDA compiler
...
- Disable templated user-defined literals when compiled under nvcc
Similarly to Intel's C++ compiler, nvcc fails to compile templated UDLs
as they both share the same parsing engine (EDG C++ Front End). This
fixes building CUDA programs which make use of fmt.
2018-09-21 06:55:45 -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
59f555ad8f
Workaround more visit lookup issues on gcc
2018-09-15 08:46:12 -07:00
Victor Zverovich
66381e308d
Minor cleanup
2018-09-13 07:37:50 -07:00
Victor Zverovich
1fb1c4c912
Update docs
2018-09-13 07:20:43 -07:00
Victor Zverovich
fbca830dd1
Update changelog, readme and improve compat
2018-09-12 12:44:04 -07:00
Victor Zverovich
bc26fbf1b0
Move experimental color API to fmt/color.h
2018-09-12 09:04:26 -07:00
Victor Zverovich
97cc889374
Workaround a visit lookup issue in gcc 8 ( #851 )
2018-09-12 08:45:14 -07:00
Victor Zverovich
7110b46076
Optimize default formatting
2018-09-12 08:45:14 -07:00
Victor Zverovich
6ffc828a79
Phasing out null_terminating_iterator
2018-09-10 06:51:38 -07:00
Victor Zverovich
aeb6add336
Skip strchr for the common case
2018-09-09 09:08:41 -07:00
Victor Zverovich
5614289dd8
Optimize and simplify format string parsing
2018-09-09 08:41:27 -07:00
Victor Zverovich
a3ba6b4f62
Disable the fmt(...) macro by default ( #853 )
2018-09-08 09:55:41 -07:00
Victor Zverovich
8671689449
Update docs and formatting
2018-09-08 09:06:54 -07:00
Victor Zverovich
2117775747
Micro-optimize parsing
2018-09-05 07:10:50 -07:00
Victor Zverovich
be0e268468
Optimize processing of trailing '}'
2018-08-31 15:34:31 -07:00
Victor Zverovich
fbc38b9083
Pass heavy arguments by ref
2018-08-31 15:17:18 -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
e483a01a0f
Implement some formatting options in Grisu
2018-08-27 17:51:49 -07:00
Victor Zverovich
f51080916e
Revert "Implement some formatting options in Grisu"
...
This reverts commit 2a952dd0b2
.
2018-08-27 17:51:27 -07:00
Victor Zverovich
2a952dd0b2
Implement some formatting options in Grisu
2018-08-26 09:51:49 -07:00
Victor Zverovich
0de44a469a
Implement exponent formatting
2018-08-26 08:12:35 -07:00
Victor Zverovich
f0d0a1ebd7
Implement Grisu2 digit generation
2018-08-25 20:45:50 -07:00
Victor Zverovich
569ac91e0b
Implement Grisu boundary computation
2018-08-25 11:39:38 -07:00
Victor Zverovich
62010520ed
Disable gnu-string-literal-operator-template warning
2018-08-22 08:12:59 -07:00
Elias Daler
18400503da
Fix C4127 warning in basic_writer<Range>::write_double
2018-08-17 07:36:38 -07:00
Victor Zverovich
9de312112a
Reformat and add a comment
2018-08-15 06:54:43 -07:00
medithe
4b868b8922
Re-enable compile-time format-string checking
...
Since the commit 691a7a9
compile-time string checking was accidently not possible anymore.
With this change, it should be possible again.
2018-08-07 07:43:47 -07:00
Victor Zverovich
4061a0d35d
Parameterize vformat to support custom char types
2018-08-05 10:44:59 -07:00
Victor Zverovich
c68bab7014
Remove broken fmt::internal::format_enum ( #818 )
2018-08-01 07:11:53 -07:00
Victor Zverovich
c684349195
Move contiguous version of format_to to fmt/core.h
2018-07-22 18:09:22 -07:00
Victor Zverovich
ffe414cad1
Add compile-time format string checks to format_to ( #783 )
2018-07-22 15:30:51 -07:00
Victor Zverovich
c178ab440f
Remove FMT_USE_RVALUE_REFERENCES
2018-07-22 15:07:53 -07:00
Victor Zverovich
35538ca66c
Merge more format overloads
2018-07-22 12:24:47 -07:00
Victor Zverovich
4f16409730
Merge format overloads using SFINAE
2018-07-22 08:06:42 -07:00
Victor Zverovich
2a4e948864
Add UTF-8 types
2018-07-22 06:36:21 -07:00
Victor Zverovich
48dff9f3c5
Update docs
2018-07-18 06:44:46 -07:00
Victor Zverovich
8615ff2acc
Micro-optimize argument retrieval
2018-07-15 07:28:31 -07:00
Victor Zverovich
e7e9578ed4
Optimize format string parsing
2018-07-14 14:27:56 -07:00
Victor Zverovich
c99a259739
Mark new functions with FMT_API ( #808 )
2018-07-14 07:43:16 -07:00
Henry Schreiner
9c32e73abf
Fixing return unreachable warning on NVCC
2018-07-09 21:33:10 -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
e928b6724c
Fix MSVC 2013 build
2018-07-04 12:33:15 -07:00
Dhruv Paranjape
ec218a3ad1
Fix redefinition warning for RESET_COLOR
2018-07-04 07:52:19 -07:00
Victor Zverovich
c04fb91b03
Fix handling of user-defined types in format_to ( #793 )
2018-07-04 07:40:56 -07:00
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
Victor Zverovich
0508bbc7ae
Add wchar_t overload of format_to_n ( #764 )
2018-06-13 08:24:32 +02:00
Remotion
47268ecd80
Fixed GCC version test
2018-06-10 20:35:38 +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
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
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