Victor Zverovich
fc5e59fe4a
Don't use stringstream
2022-09-02 13:05:26 -07:00
Victor Zverovich
d6a8704605
Improve locale support
2022-09-02 11:52:19 -07:00
Victor Zverovich
56c72a671c
Reduce locale dependency
2022-09-02 10:22:11 -07:00
Zach Toogood
4191477b98
Add formatter for std::exception ( #3062 )
...
Co-authored-by: fekir <federico.kircheis@gmail.com >
Co-authored-by: Alexey Ochapov <alexez@alexez.com >
Co-authored-by: Vladislav Shchapov <vladislav@shchapov.ru >
Co-authored-by: fekir <federico.kircheis@gmail.com >
Co-authored-by: Alexey Ochapov <alexez@alexez.com >
Co-authored-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-09-02 08:33:37 -07:00
Victor Zverovich
75383a87f9
Inline trivial functions
2022-09-01 18:25:23 -07:00
Victor Zverovich
48327a82e3
Make format.h compile faster
2022-09-01 17:06:47 -07:00
Victor Zverovich
b79ed4105a
Remove unnecessary type_identity
2022-09-01 16:29:08 -07:00
Victor Zverovich
64e29893cf
Improve locale support
2022-09-01 14:48:43 -07:00
Victor Zverovich
0b0f7cfbfc
hip workaround
2022-09-01 09:18:53 -07:00
Greg Sjaardema
40e414d823
Fix compilation error with gcc-7.2.0
...
Without the added line, the gcc-7.2.0 compiler will give the following error:
```
/opt/compiler-explorer/libs/fmt/trunk/include/fmt/format.h:1240:8: error: uninitialized variable 'buffer' in 'constexpr' function
Char buffer[digits10<UInt>() + 1];
^~~~~~
```
See https://godbolt.org/z/fh7TMs9qs
2022-08-30 10:55:57 -07:00
Vladislav Shchapov
a07411c2b9
Disable compile-time checks for dynamic width/precision test for LCC and compiler without std::is_constant_evaluated()
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-08-29 13:33:48 -07:00
Vladislav Shchapov
797d82b21a
Disable non-type template args for LCC
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-08-29 13:33:48 -07:00
Vladislav Shchapov
a553521d6d
Disable "GCC optimize" pragma for LCC
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-08-29 13:33:48 -07:00
Victor Zverovich
1f575fd5c9
Bump version
2022-08-27 08:55:39 -07:00
Victor Zverovich
91481f255c
Detemplatize code_point_length_impl
2022-08-26 15:45:00 -07:00
Vladislav Shchapov
f98048b621
Fix bugs in utf8 decoder ( #3056 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-08-26 15:37:15 -07:00
Victor Zverovich
4a8e2949bb
Fix formatting of ranges of code unit types
...
Thanks Nicole Mazzuca.
2022-08-26 13:48:58 -07:00
Victor Zverovich
e724bbea16
Fix wchar_t corner cases
2022-08-24 12:23:10 -07:00
Bernhard Manfred Gruber
665d9779ec
Disable non-type template args for nvhpc ( #3053 )
2022-08-24 10:56:45 -07:00
Victor Zverovich
391f922acc
Improve error reporting in format string compilation
2022-08-24 09:05:15 -07:00
Vladislav Shchapov
489dabbd31
Fix decoder on broken utf8 sequences. ( #3044 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-08-24 07:13:27 -07:00
Victor Zverovich
1f95c34381
Fix sign handling with large code units
2022-08-20 07:46:58 -07:00
Olli Lupton
fbb568bce0
nvhpc/22.3: workaround for c++17 mode. ( #3043 )
2022-08-18 11:30:40 -07:00
Mark Santaniello
fd93b633b8
Constexpr formatted_size ( #3026 )
...
* Constexpr formatted_size
* Add C++20 tests for gcc 9 and 10
* Adjust unit test to require __cpp_lib_bit_cast
2022-08-10 09:35:30 -07:00
Victor Zverovich
7fb8d33f9d
Fix compile-time width/precision type check
2022-08-09 16:10:02 -07:00
Dimitrij Mijoski
8bd02e93b2
Reduce conditional compilation
2022-08-09 09:05:01 -07:00
Dimitrij Mijoski
d9c1c7353a
Use is_utf8() in print(std::ostream&, ...)
...
This patch concludes the Unicode support for print(ostream&, ...)
2022-08-09 09:05:01 -07:00
Hannes Friederich
b9087ee587
Suppress unused typedef warning
2022-08-05 15:27:01 -07:00
Vladislav Shchapov
90c48b8525
Remove double code execution
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
5a8b7cd742
Add comment
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
36a25d75b4
Reuse detail::string_literal in the chrono formatter
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
6c9304b2c2
Replace ParseContext with basic_format_parse_context
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
24ab9dd19e
Remove duplicate method
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
a95dc17017
Remove unused condition
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-08-05 06:15:59 -07:00
Victor Zverovich
5f774c0aed
I shouldn't be there
2022-08-02 16:35:50 -07:00
Vladislav Shchapov
6c6b1fbf6e
Workaround a bug in MSVC
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-08-02 06:46:02 -07:00
Victor Zverovich
6452e3c9eb
Fix a typo in example
2022-08-02 06:26:19 -07:00
Dimitrij Mijoski
756822ba39
Fix Unicode handling for ostream under Windows with libc++. ( #3001 )
...
Also replaces the SFIANE tricks applied in
ce7ecdb7af with conditional compilation.
The code was too complicated along with the other trick to access private
data members.
2022-07-30 06:49:21 -07:00
Barry Revzin
0b2862a1e4
Range formatter ( #2983 )
...
* Implement range_formatter and format_kind
* Attempted gcc 4.8 fix
* gcc 4.8 interprets inaccessible as a hard error (instead of... not available)
* Attempting to delete set_debug_format.
* clang-format
* Different implementation of FMT_STATICALLY_WIDEN
* Renaming copy_str_range to copy_str.
* I guess I need a definition
* Forgot to delete these.
* Other PR comments.
2022-07-29 13:55:16 -07:00
Victor Zverovich
e9ca7ea472
Suppress a bogus warning
2022-07-28 07:12:49 -07:00
Dimitrij Mijoski
81f1cc74a7
Improve Unicode handling when writing to an ostream on Windows ( #2994 )
...
* Refactor detail::print() by splitting into two functions.
The part with SetConsoleW is a separate function, without fwrite().
* Make Unicode handing when writing to std::ostream more robust.
Calls to print(ostream&) in the special Unicode case on Windows fallback
to writing via ostream::write instead of fwrite().
* Fix Unicode handling when writing to an ostream on GCC on Windows
* Add TODO note about detail::is_utf8()
* Fix warning -Wundef
* Fix for non-Windows OSs
* Fix building as DLL on Windows
* Refactor
* Suppress warning
2022-07-23 08:03:31 -07:00
Victor Zverovich
48e0a59222
Implement compile-time checks for dynamic width/precision type
2022-07-22 17:00:40 -07:00
Federico
bc5c7c50fd
Fixes IBM XLC behavior with uint128 fallback ( #2985 )
...
* Fixes IBM XLC behavior with uint128 fallback
* Replace legacy xlc with clang-based xlc
* simplify xlc intrinsics handling
Co-authored-by: Federico Busato <fbusato@nvidia.com >
2022-07-22 13:49:17 -07:00
Victor Zverovich
371f9c71ca
Fix even in format_dragon
2022-07-19 08:36:34 -07:00
Victor Zverovich
91abfcd6cf
Suppress an msvc warning
2022-07-16 08:57:09 -07:00
Victor Zverovich
deeab54b40
Remove unused include
2022-07-15 20:11:35 -07:00
Junekey Jeon
688a627d6c
Remove unused constants.
2022-07-14 15:25:35 -07:00
Junekey Jeon
9bb1605f10
Remove some branches
2022-07-14 15:25:35 -07:00
Junekey Jeon
8061d9afbe
Simplify Dragonbox implementation
2022-07-14 15:25:35 -07:00
Victor Zverovich
d82e1a108d
Make sure the correct fmod overload is called
2022-07-13 12:42:03 -07:00