Björn Schäpers
2d66ad5d33
Suppress -Wshadow
...
Solves:
/fmt/include/fmt/ostream.h:89:18: warning: declaration of 'fbuf' shadows a previous local [-Wshadow]
89 | else if (auto* fbuf = dynamic_cast<__gnu_cxx::stdio_filebuf<char>*>(rdbuf))
| ^~~~
C:/GIT/ok-mimot/libs/3rdParty/fmt/include/fmt/ostream.h:87:13: note: shadowed declaration is here
87 | if (auto* fbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf<char>*>(rdbuf))
| ^~~~
2022-09-13 11:14:30 -07:00
Björn Schäpers
042af53324
Suppress -Wfloat-equal
...
Only NaN and Inf are not less than Inf and the check for NaN is done
before.
Solves:
.../fmt/include/fmt/format.h:2509:43: warning: comparing floating-point with '==' or '!=' is unsafe [-Wfloat-equal]
2509 | return !detail::isnan(value) && value != inf && value != -inf;
2022-09-13 11:14:30 -07:00
Victor Zverovich
192859c2b5
Optimize writing to buffers via back_insert_iterator
2022-09-12 15:32:12 -07:00
Vladislav Shchapov
61844b6b67
Fix build error on GCC-9
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-09-12 07:02:29 -07:00
Victor Zverovich
94ceb38a09
Improve locale API
2022-09-11 09:33:31 -07:00
Victor Zverovich
58c4c012fa
Disable slow windows build and simplify write_loc
2022-09-11 08:35:09 -07:00
Victor Zverovich
c3494ae364
Refactor float localization
2022-09-11 07:47:27 -07:00
Vladislav Shchapov
21c2137e77
Add class name output to formatter for std::exception ( #3076 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-09-10 08:04:00 -07:00
Victor Zverovich
ecffca6726
Don't parse '}' as fill
2022-09-07 17:33:31 -07:00
gerboengels
3176e0fad7
Add locale overload for formatted_size ( #3084 ) ( #3087 )
...
Co-authored-by: Gerbo Engels <gerbo.engels@ortec-finance.com >
2022-09-07 14:15:12 -07:00
VinaCC
1feb430faa
Fix intellisense on Windows ( #3082 )
...
__INTELLISENSE__ is 1 on vs2022 and clang, causing FMT_HAS_INCLUDE, FMT_USE_FCNTL, etc to be 0.
That results in VS and VSCode having a lot of linter errors while code compiles just fine.
2022-09-05 11:50:06 -07:00
Victor Zverovich
b98ffb7dbd
Improve locale handling
2022-09-04 21:07:30 -07:00
Vladislav Shchapov
bac53951b8
Add starts_with to basic_string_view. ( #3080 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-09-04 11:41:16 -07:00
Victor Zverovich
d59b89e9cd
More locale
2022-09-04 11:23:45 -07:00
Victor Zverovich
58a5563a9f
Implement grouping
2022-09-04 09:01:26 -07:00
Victor Zverovich
1b94271ff6
Add support for UTF-8 digit separators
2022-09-03 11:01:05 -07:00
Victor Zverovich
768d79a839
Implement format_facet
2022-09-03 09:42:36 -07:00
Victor Zverovich
91ecb38a34
Localize negative integers
2022-09-03 07:01:11 -07:00
Victor Zverovich
aec3bb5d0a
Workaround C complex.h idiocy
2022-09-03 06:35:55 -07:00
NewbieOrange
29c6000137
Simplify is_variant_like_ check, fix compile error before GCC 11 ( #3072 )
...
Co-authored-by: Vladislav Shchapov <vladislav@shchapov.ru >
Co-authored-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-09-02 21:08:07 -07:00
Victor Zverovich
fec5515c55
num_format_facet -> format_facet
2022-09-02 18:55:08 -07:00
Victor Zverovich
f187274d36
Add loc_value
2022-09-02 13:45:23 -07:00
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