Vladislav Shchapov
880e1494dc
Improve xchar support for std::bitset formatter
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2025-01-03 09:16:21 -08:00
Vladislav Shchapov
141380172f
Allow disabling <filesystem> by define FMT_CPP_LIB_FILESYSTEM=0 ( #4259 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2024-12-09 07:13:24 -08:00
Alex Hirsch
9600fee020
Include <filesystem> only if FMT_CPP_LIB_FILESYSTEM is set ( #4258 )
...
This change results out of necessity since the Nintendo Switch console
SDK does not support `std::filesystem`. The SDK still provides the
`<filesystem>` header, but with an `#error` directive, effectively
breaking any build that includes `<filesystem>`
Because `<filesystem>` is present, `FMT_HAS_INCLUDE` is insufficient
here. With this change and `FMT_CPP_LIB_FILESYSTEM` in place, one can
define `FMT_CPP_LIB_FILESYSTEM=0` to work around this issue.
This assumes that `<filesystem>` can be included (without warnings) if
`FMT_CPP_LIB_FILESYSTEM` is set. If this is not the case, fmt would be
broken even before this change as `std::filesystem::path` is used
without the accompanying header.
2024-12-07 06:45:54 -08:00
Victor Zverovich
ff92223549
Simplify locale handling
2024-09-22 10:21:19 -07:00
Victor Zverovich
3b70966df5
Add width and alignment support to error_code
2024-09-21 07:58:03 -07:00
Vladislav Shchapov
1f87b1c58d
Use fmt::formatter specialization for std::reference_wrapper to avoid undefined behavior ( #4164 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2024-09-19 10:34:33 -07:00
Yedidya Feldblum
07e70151d5
format std::reference_wrapper
2024-09-16 19:05:18 -07:00
Vladislav Shchapov
22d50c1a9c
Add support formatting std::expected<void, E>
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2024-09-04 12:31:44 -07:00
Victor Zverovich
8c4cfab57a
Detemplatize parse
2024-09-01 14:32:55 -07:00
Victor Zverovich
64a6c84592
basic_format_parse_context -> parse_context
2024-09-01 08:09:37 -07:00
Victor Zverovich
b906c321f0
Get rid of bit fields
2024-08-11 10:28:09 -07:00
Victor Zverovich
50a8c3e9bf
Reduce format specs size
2024-08-10 09:34:35 -07:00
Victor Zverovich
7891699737
Simplify handling of dynamic specs
2024-08-04 08:47:07 -07:00
Victor Zverovich
a80d668a52
Diagnose invalid precision
2024-07-27 10:41:54 -07:00
Vladislav Shchapov
a96259701e
Improve std::complex formatter ( #4050 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2024-07-04 17:24:01 -07:00
Vladislav Shchapov
24c1f886af
Remove double has_value check ( #4040 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2024-07-01 09:24:33 -07:00
Victor Zverovich
18a9676d95
Add an experimental path
2024-06-21 08:14:20 -07:00
Vladislav Shchapov
514b6955d2
Suppress a bogus warning in MSVC ( #4023 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2024-06-19 08:49:43 -07:00
Victor Zverovich
c00149f5e2
Fix a typo
2024-06-17 06:58:33 -07:00
Victor Zverovich
71244e07de
Cleanup includes
2024-06-16 11:10:38 -07:00
Victor Zverovich
febd8ed5fe
Cleanup includes
2024-06-16 10:59:06 -07:00
LoveSy
8687315e86
Guard more system headers by FMT_MODULE ( #4006 )
...
* Guard more system headers by `FMT_MODULE`
* Merge FMT_MODULE and FMT_IMPORT_STD
2024-06-14 10:53:51 -07:00
Matthias Moulin
728f9bc388
Added std::type_info formatter ( #3978 )
...
* Added std::type_info formatter;
* Reused std::type_info formatter in std::exception formatters;
* Updated MSVC std::type_info outputting to exclude all class, struct and enum occurences.
2024-05-28 10:57:08 -07:00
Edoardo Lolletti
028bffa083
Update checks for dynamic_cast usage when compiled with no rtti ( #3963 )
...
* Rename FMT_USE_TYPEID to FMT_HAS_RTTI and use it as check to enable dynamic_cast usage
* FMT_HAS_RTTI->FMT_USE_RTTI
2024-05-19 11:21:55 -07:00
Matthias Moulin
116a9ce488
Added FMT_IMPORT_STD feature macro ( #3928 )
2024-04-10 11:48:32 -07:00
Vladislav Shchapov
45b772f85c
Improve std::complex formatter to be compatible with P2197R0 ( #3900 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2024-03-20 13:31:32 -07:00
Victor Zverovich
c0dac83982
Use p2197 format for complex by default
2024-03-19 07:55:45 +09:00
Victor Zverovich
bb882c03bc
Simplify path formatting
2024-03-19 07:47:42 +09:00
Vladislav Shchapov
73f2b344b2
Add std::complex formatter
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2024-03-17 15:26:18 -07:00
prlw1
0166f455f6
std.h c++23 build fix ( #3856 )
...
Add ::value to is_formattable<...> as per suggestion by @vitaut in
https://github.com/fmtlib/fmt/issues/3854
2024-02-19 10:19:39 -08:00
Dominic Pöschko
e5bab8dab4
added formatter for std::expected ( #3834 )
2024-02-03 09:06:15 -08:00
Edoardo Lolletti
06fc25f266
Don't always enable typeid usage under msvc ( #3821 )
2024-01-21 06:28:22 -08:00
Victor Zverovich
8510838db1
Make format_specs not depend on code unit type
2024-01-17 07:50:52 -08:00
Hans-Martin B. Jensen and Hans-Martin B. Jensen
7c163acfda
Fix conversion warning in filesystem::path formatter ( #3806 )
...
* Fix conversion warning in filesystem::path formatter
Use template character type to eliminate MSVC conversion warning when
formatting a wide chararacter path:
fmt\std.h(140,49): warning C4244: '=': conversion from 'const Char' to 'char', possible loss of data
* Review: use to_ascii instead
---------
Co-authored-by: Hans-Martin B. Jensen <haje@eposaudio.com >
2024-01-13 08:02:31 -08:00
Victor Zverovich
fd87a23d34
Reduce memory dependency
2024-01-10 20:00:15 -08:00
Victor Zverovich
a5ae9ae19d
Split standard context into a separate class and optimize
2024-01-08 07:08:49 -08:00
Victor Zverovich
0641b844ac
Cleanup string traits
2024-01-05 19:31:04 -08:00
Victor Zverovich
47c8f63d02
Remove redundant specifier
2023-12-28 07:32:07 -08:00
Victor Zverovich
d5da9cc40e
Apply clang-tidy
2023-12-19 17:52:50 -08:00
Kefu Chai
6855bd532b
Apply clang-format
...
* use clang-format v17.0.6 to reformat the tree
* tweak some places so that clang-format does not mutate the layout
of code too much
Signed-off-by: Kefu Chai <tchaikov@gmail.com >
2023-12-13 07:18:37 -08:00
Mikael Simberg
89860eb901
Use void(*)(void*) instead of decltype(&std::free) to satisfy clang in CUDA mode ( #3751 )
...
clang can't resolve &std::free in decltype(&std::free) because std::free
is overloaded (for host and device).
2023-12-11 09:44:02 -08:00
Félix-Antoine Constantin
99b9fbf8ef
Add formatter for std::source_location ( #3730 )
2023-11-30 10:05:56 -08:00
Victor Zverovich
8f83ee2ad1
Apply coding conventions
2023-11-30 08:24:02 -08:00
Victor Zverovich
2a8a694466
Clarify that mixing code unit types is deprecated
2023-11-30 08:20:01 -08:00
Victor Zverovich
04718008ab
Minor cleanup
2023-11-30 07:43:31 -08:00
js324
b87ea22e29
Add native and generic representation for filesystem::path format spec ( #3729 )
2023-11-29 14:49:36 -08:00
Kai Aoki
45e124ee43
Added workaround for old xcode compiler bug ( #3716 )
...
* Added macros to disable std::filesystem and std::variant as a workaround for old xcode bugs
* Change macro to positive logic
2023-11-15 09:19:08 -08:00
Victor Zverovich
4548d1eae2
Make write_escaped_path more portable
2023-11-07 05:46:15 -10:00
Victor Zverovich
050d41e857
Make get_path_string more portable
2023-11-06 14:34:53 -10:00
Victor Zverovich
f7542c5761
Apply clang-format
2023-10-14 06:52:43 -07:00