Victor Zverovich
864b9a2202
Correct the comment
2019-02-04 08:29:39 -08:00
Victor Zverovich
1538336836
Remove unnecessary checks
2019-02-04 08:25:41 -08:00
Victor Zverovich
355eb6d29a
Enable grisu for shortest roundtrip (default) formatting
2019-02-03 10:38:28 -08:00
Victor Zverovich
b8d34e0db3
Fix rounding
2019-02-02 09:19:46 -08:00
Victor Zverovich
e61cac687d
Minor grisu improvements
2019-02-02 07:41:52 -08:00
Victor Zverovich
7ca8fc3b17
Fix a bogus warning
2019-01-30 07:06:40 -08:00
Victor Zverovich
58b6f8db48
Format the code using clang-format
2019-01-13 06:58:20 -08:00
Sign Bit
0bbdca5b8b
Fix conversion warnings ( #989 )
...
* Fix sign conversion warnings
* Ignore unused local typedefs
* Remove cast reported as useless on GCC
* Remove warning on unused variable
* Enable conversion warning checking for pedantic build
* Fix sign-conversion warnings in headers
2018-12-20 06:24:19 -08:00
Victor Zverovich
0497875ff3
Stop the orgy of casts
2018-12-05 06:27:31 -08:00
Florin Iucha
77656c672c
Fix sign-conversion warnings reported by Clang7
2018-12-03 16:22:59 -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
fa1d4dbcfd
Fix warnings
2018-11-28 16:15:15 -08:00
Victor Zverovich
b7b8548559
thousands_sep -> thousands_sep_impl ( #939 )
2018-11-20 15:43:17 -08:00
Victor Zverovich
f2ee988105
Improve locale support
2018-11-14 12:07:39 -08:00
Victor Zverovich
324eac1aa5
Make locales work with any character type
2018-10-28 09:03:27 -07:00
Victor Zverovich
0a96c032b9
Parameterize v*printf on string type ( #920 )
2018-10-25 13:52:08 -07:00
Victor Zverovich
2d2326a76d
Fix compilation with older gcc
2018-10-23 07:31:24 -07:00
Victor Zverovich
13d472bd8c
Compute output size for grisu
2018-10-18 17:16:50 -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
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
699297520a
Implement Grisu rounding
2018-10-13 11:18:54 -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
38325248e5
Count width in code points ( #628 )
2018-10-03 20:09:46 -07:00
Victor Zverovich
f8027414f5
Impelement char8_t support
2018-09-30 12:31:25 -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
d7f17613f5
Fix compilation on platforms with exotic double ( #878 )
2018-09-26 08:45:34 -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
bc26fbf1b0
Move experimental color API to fmt/color.h
2018-09-12 09:04:26 -07:00
medithe
8cbfb6e727
Get rid of conversion warning in gcc-4.8 ( #854 )
...
Get rid of conversion warning in gcc-4.8
Get rid of the following warning:
conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Werror=conversion]
2018-09-11 06:14:39 -07:00
medithe
981797f059
Get rid of implicit-fallthrough warn. in GCC 7 and 8
...
This change enables FMT_FALLLTHROUGH also for GCC-Compilers in the versions 7 and 8.
2018-09-07 12:43:32 -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
medithe
95a718992c
Remove conversion compiler warnings ( #844 )
...
* Remove conversion compiler warning
When compiling with g++8, I get the following two errors:
include/fmt/format-inl.h:400:29: error: conversion from ‘int’ to ‘char’ may change value [-Werror=conversion]
buffer[size++] = zero + static_cast<char>(digit);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/fmt/format-inl.h:416:28: error: conversion from ‘int’ to ‘char’ may change value [-Werror=conversion]
buffer[size++] = '0' + digit;
~~~~^~~~~~~
With this change, the errors are gone.
2018-08-29 06:38:56 -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
Thomas Bernard
abde38b4fb
Add compilation support with Newlib nano for embedded targets
...
Remove the dependency on std::locale to reduce executable sizes
For embedded target the usage of locale bring a huge amount of code to the executable, just to get hold of the thousands separator. Using a static defined thousands separator makes libfmt embedded target friendly.
2018-08-19 07:40:34 -07:00
Victor Zverovich
9de312112a
Reformat and add a comment
2018-08-15 06:54:43 -07:00
Victor Zverovich
2a4e948864
Add UTF-8 types
2018-07-22 06:36:21 -07:00
Dhruv Paranjape
ec218a3ad1
Fix redefinition warning for RESET_COLOR
2018-07-04 07:52:19 -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
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
b60a5c5d49
Improve floating-point formatting
2018-05-28 20:16:30 -07:00
Victor Zverovich
4e4b8570e5
Implement simple version of Grisu
2018-05-28 11:25:07 -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
6ebc1a967d
Merge locale.h into format-inl.h
2018-05-20 17:16:34 -07:00
Victor Zverovich
69823bf852
Improve naming consistency
2018-05-19 08:59:37 -07:00
Victor Zverovich
838400d29b
Add inline namespace fmt::v5
2018-05-12 11:02:15 -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
Daniela Engert
6cd666100f
remove trailing spaces.
...
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-05-01 07:10:05 -07:00
Victor Zverovich
2768af2388
Add cached powers of 10
2018-04-29 06:33:05 -07:00
Victor Zverovich
cd90097ca4
Implement handmade FP
2018-04-21 17:26:24 -07:00
Victor Zverovich
3da71d51e0
Move source files to the src directory
2018-03-21 07:50:59 -07:00