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
e6b37b4aff
Handle block boundaries in utf8_to_utf16
2019-12-21 16:33:34 -08:00
Victor Zverovich
74532c23a3
Make type a scoped enum
2019-12-21 12:22:17 -08:00
Victor Zverovich
1b1c70108a
trailing_zeros -> showpoint
2019-12-18 12:12:09 -08:00
Victor Zverovich
1afe201ae8
Handle block boundaries in utf8_to_utf16
2019-12-18 10:35:51 -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
9f2e7edaeb
Fix handling of types convertible to std::string_view
2019-12-09 13:25:08 -08:00
Florin Iucha
d3aa0c3a28
Clean-up sign-conversion warnings in test code
2019-12-08 16:07:43 -08:00
Victor Zverovich
31de9a1b80
Revert "Clean-up sign-conversion warnings in test code"
...
This reverts commit 227bfe62dd
.
2019-12-08 15:47:24 -08:00
Florin Iucha
227bfe62dd
Clean-up sign-conversion warnings in test code
2019-12-08 15:21:38 -08:00
Deniz Evrenci
1ab80aa92c
Fix handling of types with custom formatters that are convertible to std::string_view
2019-12-06 11:40:21 -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
b994a0ab13
Fix handling of missing fraction in snprintf_float
2019-11-29 06:17:29 -08:00
Victor Zverovich
d19ed6716d
Fix hexfloat buffer reallocation
2019-11-25 15:54:04 -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
43271ba8e8
Handle null terminator at the end of the buffer
2019-11-24 07:15:25 -08:00
Victor Zverovich
66d7746bb3
Use grisu for exponent notation
2019-11-19 16:55:11 -08:00
Leon Klingele
78842ce0d6
test: add default constructor for a const value
...
This fixed a compilation error of the OS X 10.11.6 C++ compiler:
./fmt/test/format-test.cc:1861:16: error: default initialization of an object of const type 'const Answer' without a user-provided default constructor
const Answer const_answer;
^
{}
2019-11-19 08:32:35 -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
dcde089b4e
Improve POSIX API detection
2019-11-15 07:28:02 -08:00
David P. Sicilia
2145a7bdcc
Move has_formatter into the public fmt namespace. ( #1407 )
...
* Move has_formatter into the public fmt namespace.
This will allow users to do SFINAE-friendly checks for
the formattability of a type.
Fixes #1369
2019-11-14 07:08:24 -08:00
daniel
f1559e1d56
Use grouping() from locale for specifier 'n'
2019-11-05 07:22:12 +00:00
Attila Tajti
0889856d61
Fix UTF-8 truncation
2019-11-03 11:53:15 +00:00
Victor Zverovich
213e09644f
Workaround X11 madness ( #1388 )
2019-11-01 08:47:11 -07:00
Victor Zverovich
d39ebf3ff2
Optimize counting
2019-10-21 06:57:42 -07:00
Victor Zverovich
8498bc97dd
Initialize all the things
2019-10-20 17:53:18 -07:00
Orivej Desh
a1079e9fd6
Fix undefined in format-test ( #1349 )
...
When `MoveCtor` performs `check_move_buffer`, the buffer allocator becomes null,
but then `MoveCtor` attempts to use it to allocate a dynamic buffer. This
succeeds nevertheless because a typical `std::allocator<char>::allocate` does
not use `this`, so it does not crash when `this` is null.
Fixes #1344
2019-10-08 15:42:51 -07:00
Victor Zverovich
c85ae23c73
Add max_value
2019-09-08 09:21:30 -07:00
Victor Zverovich
f7a4b4ab91
Make numeric alignment optional
2019-09-06 09:43:53 -07:00
Victor Zverovich
611cf0b3c6
Format octal 0 as 0
2019-09-06 07:03:47 -07:00
Victor Zverovich
1882b9687b
Reduce the numer of ifdefs with an empty (u)int128_t fallback
2019-09-05 18:03:47 -07:00
Deniz Evrenci
6de0454b42
Add support for built-in __int128 when available
2019-09-04 07:05:08 -07:00
Victor Zverovich
422e7b9d70
Fix compile-time checks for user-defined types ( #1292 )
2019-08-31 08:35:38 -07:00
Victor Zverovich
c76957565c
FixedEnum -> StrongEnum and make it a regression test
2019-08-31 08:16:47 -07:00
Egor Seredin
bcd9b9331a
Map not int enum to correct underlying_type ( #1286 )
...
* Map not int enum to correct underlying_type
* Use non-zero constant in TestFixedEnum
2019-08-31 06:25:38 -07:00
Victor Zverovich
3f75e2b69e
Make buffer_range public and update custom formatting docs ( #1281 )
2019-08-28 06:50:20 -07:00
Victor Zverovich
c1e97392be
Fix warnings
2019-08-11 08:44:12 -07:00
Jack Andersen
699fe8e711
Remove const qualification in compile-time checks
2019-07-15 09:20:16 +02:00
Victor Zverovich
e4f84ee1c6
Refactor format_specs for #1109 and #940
...
Refactor `format_specs` and related APIs to support variable-width fill
(#1109 ), improve naming consistency, remove legacy setters (#940 ), and
optimize layout.
2019-07-06 20:57:40 -07:00
Victor Zverovich
bc14c6ee20
Use the decimal point from locale
2019-07-03 17:55:00 -07:00
Victor Zverovich
c9d5a08ed8
Add the 'n' float format specifier
2019-07-03 16:36:23 -07:00
Victor Zverovich
ded0a3bb3d
Internalize undocumented basic_writer
2019-07-03 10:01:03 -07:00
Victor Zverovich
ab0ba8a9d0
Don't emit decimal point if there are no trailing digits ( #1210 )
2019-06-30 08:44:59 -07:00
Victor Zverovich
260c115908
Fix formatting of 0.0 with ( #1210 )
2019-06-30 06:54:41 -07:00
Victor Zverovich
72e519a4bd
Add formatter<std::string_view>
2019-06-22 20:26:28 -07:00
Victor Zverovich
f13906f408
back_insert_range<internal::buffer> -> buffer_range
2019-06-19 14:12:29 -07:00