Victor Zverovich
391f922acc
Improve error reporting in format string compilation
2022-08-24 09:05:15 -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
b135f1c014
Refactor handling of argument types
2022-06-09 17:03:33 -07:00
Victor Zverovich
f61a1e8132
Add format_arg_types
2022-06-09 15:50:30 -07:00
Victor Zverovich
4bb3af7a6b
Improve compile-time checks
2022-06-05 13:58:04 -07:00
Victor Zverovich
e927149f8e
Cleanup macros
2022-05-29 17:23:02 -07:00
Sean McBride
5379063b54
Fixed clang -Wreserved-identifier warings
...
Created FMT_UNCHECKED_TYPE that resolves to special identifier _Unchecked_type for Microsoft, but to a dummy string otherwise. Using
_Unchecked_type is invalid because underscore + uppercase is a reserved identifier.
2022-03-24 07:33:43 -07:00
Victor Zverovich
0b7c045a2f
Simplify _cf
2022-03-08 15:31:51 -08:00
Victor Zverovich
e2ba01fcb0
Fix overload ambiguity in print
2022-02-05 08:35:19 -08:00
Victor Zverovich
c7173a36a1
Drop :: and fix formatting
2022-02-02 07:00:33 -08:00
Charlie Barto
3e8372b96e
qualify unqualified calls to format in compile.h ( #2742 )
2022-02-01 18:41:19 -08:00
Barry Revzin
a34a97cc1d
Supporting ? as a string presentation type ( #2674 )
...
* Supporting ? as a string presentation type.
* Supporting ? as a char presentation type.
* Adding iterator_category to counting_iterator.
2022-01-30 08:55:28 -08:00
Josh Essman
f56756986b
fix: check to make sure both 'if constexpr' and return type deduction are available
...
fix: remaining ifdefs
2021-10-14 10:44:24 -07:00
Victor Zverovich
dcd282bb26
Namespace qualify calls to get
2021-10-09 07:15:14 -07:00
Johnathan
f20f50368f
Replace throw with FMT_THROW ( #2427 )
...
Using `throw` results in compile errors with `-fno-exceptions`. gcc seems fine with it, but arm-gcc and clang would complain.
2021-07-18 07:08:24 -07:00
Daniela Engert
0193e7c428
Support compile-time strings and compile-time format string compilation in module
...
Make just the necessary parts available for lookup from client context.
2021-06-11 09:38:53 -07:00
Alexey Ochapov
ee52a6dc40
add fmt::print() overload to support compiled format ( #2304 )
2021-05-25 14:54:56 -07:00
Victor Zverovich
39c3c4ec22
Simplify the core API
2021-05-19 08:32:57 -07:00
Victor Zverovich
21d93bfd33
Move generic format functions to format.h
2021-05-18 19:01:43 -07:00
Alexey Ochapov
54f22a3eef
add support for statically named arguments with FMT_STRING
2021-05-14 16:31:10 -07:00
Daniela Engert
ea94d6d93c
Prevent ambiguity in name lookup
...
Unqualified calls to 'make_format_args' may find the same name by ADL in <format> if this C++20 header happens to be directly or indirectly included in a translation unit. Do a qualified lookup instead.
2021-05-14 07:10:02 -07:00
Victor Zverovich
08da1adcf6
Remove unused headers
2021-05-13 17:58:15 -07:00
Victor Zverovich
d1aebdbde0
Inline format_to
2021-05-12 18:07:59 -07:00
Victor Zverovich
4862930845
Optimize format string compilation
2021-05-09 09:15:55 -07:00
Victor Zverovich
9155e2de4c
Cleanup tests
2021-05-01 17:11:45 -07:00
Victor Zverovich
ccf4ccde23
Cleanup tests and format string compilation
2021-04-29 19:50:04 -07:00
Victor Zverovich
e96a92f869
Cleanup tests and format string compilation
2021-04-29 16:21:08 -07:00
Victor Zverovich
355be4b13f
Make FMT_COMPILE fallback on runtime without if constexpr ( #2261 )
2021-04-28 09:11:47 -07:00
Alexey Ochapov
1678ed6235
simplify field::format() and spec_field::format(), fix typo
2021-04-25 07:53:49 -07:00
Alexey Ochapov
ca821982ee
use named arg with static name in compile-time API
...
to get arg index by name at compile-time
2021-04-25 07:53:49 -07:00
Alexey Ochapov
fc56af14c2
move fixed_string from compile.h to format.h
2021-04-25 07:53:49 -07:00
Alexey Ochapov
1d4199f46b
fix udl_compiled_string with non-byte chars (e.g. wchar) ( #2242 )
2021-04-19 08:29:35 -07:00
Daniela Engert
f4bbc54cc4
Tag official API for module export ( #2235 )
...
* functions
* classes
* UDLs
* other declarations
Export everything in namespace 'fmt' from core.h and format.h
2021-04-16 11:04:55 -07:00
Victor Zverovich
9cb347b4b2
Simplify argument formatters
2021-03-21 09:31:46 -07:00
Alexey Ochapov
c8d8b88223
fix GCC 7,8,9 warning about unused but set parameter ( #2177 )
2021-03-13 06:36:53 -08:00
Victor Zverovich
60f5d24411
Simplify arg_formatter
2021-03-10 09:35:48 -08:00
Alexey Ochapov
6a9016ea60
fix formatted_size with "compiled format" as argument ( #2161 )
2021-03-07 06:44:36 -08:00
Victor Zverovich
6e1fc01752
Move detail::truncating_iterator to fmt/compile.h
2021-03-06 08:35:36 -08:00
Alexey Ochapov
684b5b0e40
Fix fallback to runtime API from compile-time API ( #2143 )
...
* fix fallback to the runtime API, add FMT_ENABLE_FALLBACK_TO_RUNTIME_API define, add test
* remove `FMT_ENABLE_FALLBACK_TO_RUNTIME_API`
* pass format string to format_to() inside format_to_n() in compile-time API
instead of compiling it inside format_to_n(), to eliminate code duplication
2021-03-04 07:20:57 -08:00
Alexey Ochapov
ab0f7d7fdc
use const& for arguments
2021-02-20 11:50:12 -08:00
Alexey Ochapov
3f69af3aaf
update wording in the error inside arg_id_handler, use FMT_ASSERT instead of throw
2021-02-20 11:50:12 -08:00
Alexey Ochapov
499047e132
fix incorrect indexing mode for named args, update tests
2021-02-20 11:50:12 -08:00
Alexey Ochapov
78c67157c1
prepare tests, fix incorrect handling of named args with simple {} replacement fields
2021-02-20 11:50:12 -08:00
Alexey Ochapov
b31bc2dc9f
simplify try_format_argument(), make manual_indexing_id() a variable
2021-02-20 11:50:12 -08:00
Alexey Ochapov
95e1aa2dc5
add support for manual indexing and named fields, add tests
2021-02-20 11:50:12 -08:00
Yin Zhong
b0b56b4379
fix #2116 (FMT_COMPILE requires exceptions enabled) ( #2117 )
...
Co-authored-by: summivox <summivox@github.com>
2021-01-28 06:58:49 -08:00
Alexey Ochapov
bbd6ed5bc5
Add support of most format_specs for formatting at compile-time ( #2056 )
2020-12-25 06:40:03 -08:00
Alexey Ochapov
5de0bc1d4f
Add UDL as replacement for FMT_COMPILE ( #2043 )
2020-12-07 15:53:11 -08:00
Alexey Ochapov
683a74501f
fix formatting with empty compiled format string ( #2042 )
2020-12-02 07:14:57 -08:00
Alexey Ochapov
dac753b81e
Basics of formatting at compile-time based on compile-time API ( #2019 )
2020-11-29 08:59:11 -08:00