Victor Zverovich
9e3f3e8cff
Fix handling of output iterators in format_to_n ( #1506 )
2020-01-05 09:59:01 -10:00
Victor Zverovich
b3fd0005dd
Suppress a bogus -Wdouble-promotion warning
2020-01-03 06:57:14 -10:00
Victor Zverovich
c85efef312
More showpoint fixes and tests ( #1498 )
2019-12-30 13:08:35 -10:00
Victor Zverovich
f219dcd59b
Add fmt::bytes
2019-12-24 10:45:15 -08:00
Victor Zverovich
dea7fde8b7
Deprecate u8string_view
2019-12-24 09:44:57 -08:00
Victor Zverovich
74532c23a3
Make type a scoped enum
2019-12-21 12:22:17 -08:00
Victor Zverovich
8b41362a0a
Add trailing decimal point if # is specified ( #1476 )
2019-12-18 12:41:56 -08:00
Victor Zverovich
1b1c70108a
trailing_zeros -> showpoint
2019-12-18 12:12:09 -08:00
Victor Zverovich
d7e72a09e0
Simplify FMT_STRING_IMPL
2019-12-18 11:50:47 -08:00
Victor Zverovich
2201890d7a
Apply clang-format and update inclusion guards
2019-12-18 11:17:36 -08:00
Greg Sjaardema
6100ed4bb3
Eliminate NVCC NVidia compiler emits unreachable code warnings
...
Similar to the MSC Compiler, the NVidia NVCC compiler also
emits unreachable code warnings when there is a return
statement following an exception. These changes eliminate
those warnings.
2019-12-18 10:39:40 -08:00
Victor Zverovich
35959a31d7
Move OS-specific APIs to a separate header
2019-12-15 11:46:45 -08:00
Victor Zverovich
ec2463c905
Implement utf8_to_utf16 using utf8_decode
2019-12-15 09:35:26 -08:00
Victor Zverovich
9e450911fa
Give an error on precision overflow
2019-12-14 07:45:27 -08:00
Victor Zverovich
068d20bc31
Avoid shadowing warnings in FMT_STRING
2019-12-14 07:00:08 -08:00
iPherian
8ab1c5c6e8
Squelch MSVC warning exporting subclasses of runtime_error (fix for PR #1433 ) ( #1470 )
...
* Squelch MSVC warning exporting subclasses of runtime_error
When compiling {fmt} as a DLL, MSVC complains that we are exporting
classes that inherit from "std::runtime_error", which we are not
exporting.
In this case, it's not really a problem because that symbol is already
exported via the C++ stdlib. So we just add a pragma to silence the
warning.
* Fix compilation with MinGW
Commit 3bc28fcc6b
("Squelch MSVC warning exporting subclasses of
runtime_error", 2019-11-29) silenced a MSVC warning under. The MinGW
compiler also defines _WIN32, but does not support the "warning" pragma.
Introduce a helper macro to squelch the MSVC warning only when using the
Microsoft compiler.
Signed-off-by: Beat Bolli <dev@drbeat.li>
* Fix compilation with VS2015 (#1450 )
VS2015 does not support the __pragma(...) syntax in the midst of a
class declaration, so move it to just before the declaration.
2019-12-13 12:16:36 -08:00
Ivan Shynkarenka
598e6042d1
warning C4468: 'fallthrough': attribute must be followed by a case label or a default label
2019-12-12 06:25:33 -08:00
Federico
b272fb3605
Extend FMT_FALLTHROUGH compatibily to gcc and clang pre-C++17 ( #1469 )
2019-12-11 14:28:20 -08:00
Florin Iucha
72879db40e
Clean-up sign-conversion warnings in public headers
2019-12-08 16:07:55 -08:00
Victor Zverovich
f443bd3baf
Ditch decimal_formatter ( #1363 )
2019-12-05 19:07:45 -08:00
Victor Zverovich
1219b65f21
Relax fallthrough attribute detection
2019-12-05 10:40:15 -08:00
Victor Zverovich
8bbe76af3a
Add a missing decimal point in exponent notation with trailing zeros
2019-12-02 11:36:33 -08:00
Victor Zverovich
4b120b68ae
Clean up includes
2019-12-01 10:19:07 -08:00
Victor Zverovich
62da1db62a
Avoid wchar_t instantiations
2019-12-01 07:34:09 -08:00
Victor Zverovich
ba6e330fd3
digits -> num_bits
2019-11-30 08:41:07 -08:00
Victor Zverovich
fafb03fa6d
Fix handling of fallback_uintptr
2019-11-30 07:31:38 -08:00
Victor Zverovich
2f9acd1838
Remove dependency on <cassert>
2019-11-29 09:37:18 -08:00
Victor Zverovich
aaf829bfb1
Fix fallback pointer formatting on big endian, take 2
2019-11-29 07:07:08 -08:00
Victor Zverovich
bb205d940d
Fix fallback pointer formatting on big endian
2019-11-29 05:15:59 -08:00
Florin Iucha
9cbf4b087c
Fix -Wconversion warnings
2019-11-28 06:43:08 -08:00
Victor Zverovich
c3be0f593d
Refactor floating-point formatting
2019-11-27 08:08:22 -08:00
Victor Zverovich
c68703c9f4
float_spec -> float_specs
2019-11-26 15:53:24 -08:00
Victor Zverovich
9a21728b0a
Remove gen_digits_params
2019-11-26 11:27:53 -08:00
Victor Zverovich
28d7191c27
Don't print trailing zero with fixed, precision=0, and showpoint ( #1417 )
2019-11-24 08:23:10 -08:00
Victor Zverovich
4cf59ce734
Integrate Grisu and sprintf digit generators
2019-11-23 06:56:29 -08:00
Victor Zverovich
7395472dde
Refactor floating-point formatting
2019-11-22 18:49:19 -08:00
Victor Zverovich
ded1e7679e
Refactor floating point formatting
2019-11-22 08:22:22 -08:00
Victor Zverovich
c7edd8e570
Cleanup FP formatting
2019-11-20 13:17:03 -08:00
Victor Zverovich
75108a56f6
Don't print % for nan and inf
2019-11-20 12:26:48 -08:00
Victor Zverovich
3e1f70fe02
Merge write_fp into write
2019-11-20 12:20:17 -08:00
Victor Zverovich
4de41aa655
Move basic_writer::write_fp to where it belongs
2019-11-20 08:22:34 -08:00
Victor Zverovich
404a880bd4
Make parse_arg_id more readable
2019-11-20 08:12:23 -08:00
Victor Zverovich
093e554211
Remove redundant qualification
2019-11-20 07:44:34 -08:00
Ivan Shynkarenka
d0696b0aa6
warning C4456: declaration of 'num_digits' hides previous local declaration
2019-11-20 06:43:46 -08:00
Victor Zverovich
66d7746bb3
Use grisu for exponent notation
2019-11-19 16:55:11 -08:00
Victor Zverovich
e9bff78814
Don't parse % unless FMT_DEPRECATED_PERCENT is set
2019-11-19 11:54:18 -08:00
Victor Zverovich
57b6f2966d
Deprecate the fmt macro
2019-11-19 11:28:17 -08:00
Victor Zverovich
d79493e5ee
Remove Grisu2
2019-11-19 09:50:59 -08:00
Victor Zverovich
5420bcce2d
Make % an opt-in to improve compatibility with std::format
2019-11-18 08:04:43 -08:00
Victor Zverovich
56a2e2075c
Refactor float spec parsing
2019-11-18 07:37:36 -08:00