Commit Graph

85 Commits

Author SHA1 Message Date
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
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
Giel van Schijndel
f76603f21e
fix: make std::bitset formattable again (#3660)
* fix: make std::bitset formattable again

It used to be formattable via operator<<(ostream&) implicitly. Make it
formattable again, but this time via formatter specialization.

* fix: make nested_formatter constexpr default constructible
2023-10-03 09:53:47 -07:00
Alex Guteniev
9b74160817
atomic_flag formatting (#3594) 2023-08-25 08:06:10 -07:00
Zhanwei Wang
5a866fe852
Add formatter for std::atomic (#3574) 2023-08-14 08:34:31 -07:00
Vladislav Shchapov
aeb6ad4dd0
Added formatter for bit_reference-like types (#3570)
* Add test for std::vector<bool>::reference

Co-authored-by: Felix <felix-antoine.constantin@polymtl.ca>
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

* Add test for std::bitset<N>::reference

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

* Add test for const std::bitset<N>::reference and const std::vector<bool>::reference

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

* Add bit_reference-like formatter

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

* Use std::addressof

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

---------

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Co-authored-by: Felix <felix-antoine.constantin@polymtl.ca>
2023-08-06 11:36:30 -07:00
razaqq
757564f5cd
add missing inline specifier (#3552) 2023-07-27 12:12:00 -07:00
Victor Zverovich
3dec65b7fd Use replacement character in path 2023-07-22 09:07:28 -07:00
Victor Zverovich
ac0ab8eff3 Improve path formatter 2023-07-20 17:49:12 -07:00