Commit Graph

5928 Commits

Author SHA1 Message Date
Tinson Lai
5ad7b71381
Fix options for C++20 experimental module in CMake (#3134)
* Fix options for C++20 experimental module in CMake

* Replace `FMT_CAN_MODULE` by `FMT_MODULE` in test/CMakeLists.txt
2022-10-12 08:23:12 -07:00
Vladislav Shchapov
d2c47c0df2
Fix broken condition (#3129)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-10-07 13:46:45 -07:00
Victor Zverovich
491c32cbd9 Workaround gcc bug 103879 2022-10-05 21:12:38 -07:00
Vladislav Shchapov
662adf4f33
Move formatter<std::error_code> from fmt/os.h to fmt/std.h (#3125)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-10-01 17:46:09 -07:00
Vladislav Shchapov
ad91cab374
Normalization of stdlib inline namespace names (#3119)
* Normalization of stdlib inline namespace names

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

* Remove all subnamespaces with names matching "__*" mask

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-09-29 09:52:38 -07:00
Vladislav Shchapov
0ccaed3a6c
Set CMAKE_RUNTIME_OUTPUT_DIRECTORY relative to CMAKE_CURRENT_BINARY_DIR instead of CMAKE_BINARY_DIR (#3120)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-09-28 16:51:23 -07:00
Patrick Roocks
ad719619cc
Support formatting of std time_point with utc_clock (#3110) 2022-09-28 07:31:53 -07:00
Dimitrij Mijoski
6e0a5f7fba Update CI to Ubuntu 20.04 and to newer versions of actions 2022-09-27 15:06:12 -07:00
huangqinjin
48f525d025 Add basic_format_string::get() 2022-09-22 19:50:04 -07:00
Victor Zverovich
0b5cb18b71 Use buffering in to_string to avoid bloat 2022-09-21 17:11:43 -07:00
Victor Zverovich
4c4f99a583 Update a godbolt link 2022-09-21 12:05:57 -07:00
Victor Zverovich
3272a7a3ce Update an example 2022-09-21 12:03:18 -07:00
Victor Zverovich
a48e3355a6 Improve docs 2022-09-18 08:44:04 -07:00
Victor Zverovich
afcf424294 Update docs 2022-09-16 15:27:18 -07:00
Victor Zverovich
ac85afaab6 Simplify format_error 2022-09-16 14:25:14 -07:00
Victor Zverovich
3178bb9a26 Update docs 2022-09-16 10:29:53 -07:00
Victor Zverovich
cf58f64c54 Update docs 2022-09-16 10:28:00 -07:00
Victor Zverovich
e4e0ae3918 Use fmt/core.h in examples 2022-09-15 20:41:32 -07:00
Victor Zverovich
d65acc4e6c Improve docs 2022-09-14 10:59:50 -07:00
Victor Zverovich
c9f790b061 Update docs 2022-09-14 10:58:52 -07:00
Victor Zverovich
6b8144a5ac Update locale docs 2022-09-14 06:38:29 -07:00
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
Sergiu Deitsch
e2f6d7665b fix gcc <= 7.1 compile errors 2022-09-12 10:43:16 -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
Vladislav Shchapov
7a752e75ff New CI: 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
Andy Maloney
8ae56161c8
Fix compilation with FMT_ENFORCE_COMPILE_STRING and FMT_WERROR (#3091) 2022-09-10 18:05:10 -07:00
Victor Zverovich
76705fc2ee Update doc 2022-09-10 15:06:09 -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