Victor Zverovich
1557ab7644
Add format_as for enums
2022-01-28 06:38:02 -08:00
Federico
b00a1eac75
Fixes NVIDIA HPC compiler and Intel ICC compatibility ( #2732 )
...
* Fixes NVIDIA HPC compiler and Intel ICC compatibility
* Fixes NVIDIA HPC compiler and Intel ICC compatibility
* Rename FMT_NVHPC_VERSION to FMT_NVCOMPILER_VERSION
Co-authored-by: Federico Busato <fbusato@nvidia.com>
2022-01-26 15:53:04 -08:00
Victor Zverovich
f7a809be6e
Clarify the choice of magic numbers and compute the most magic one
...
https://github.com/fmtlib/fmt/pull/2713#discussion_r788349826
2022-01-23 08:58:58 -08:00
Victor Zverovich
09fde7f4b8
Add fmt::underlying for enum classes
2022-01-22 08:06:22 -08:00
Victor Zverovich
0014024a2c
Don't rely on transitive includes
2022-01-21 15:03:28 -08:00
Victor Zverovich
c28500556a
FMT_NOEXCEPT -> noexcept
2022-01-20 16:55:47 -08:00
Junekey Jeon
6240d02011
Improve comments
2022-01-19 17:03:44 -08:00
Junekey Jeon
925b744ae8
Improve comments
2022-01-19 17:03:44 -08:00
Junekey Jeon
22b14ff252
Simplify cache recovery
2022-01-19 17:03:44 -08:00
Junekey Jeon
3dc26b44d3
Make a fallback path more compiler-friendly
2022-01-19 17:03:44 -08:00
Junekey Jeon
2e4038bf51
Simplify lines with __builtin_addcll and friends
2022-01-19 17:03:44 -08:00
Junekey Jeon
76336b4f63
Replace noexcept with FMT_NOEXCEPT
2022-01-19 17:03:44 -08:00
Junekey Jeon
9181983483
Fix syntax errors
2022-01-19 17:03:44 -08:00
Junekey Jeon
74097a149b
Remove now-unused stuffs
2022-01-19 17:03:44 -08:00
Junekey Jeon
21a1c53381
Fix typo
2022-01-19 17:03:44 -08:00
Junekey Jeon
04eea0f0a8
Remove now-unused stuffs
2022-01-19 17:03:44 -08:00
Junekey Jeon
35a468ed38
Simplify integer checks
2022-01-19 17:03:44 -08:00
Junekey Jeon
1882a7a2c1
Replace Dragonbox cache which allows simpler cache recovery & integer checks
2022-01-19 17:03:44 -08:00
Junekey Jeon
f4dd1b1b8b
Simplify Dragonbox Step 3.
2022-01-19 17:03:44 -08:00
Junekey Jeon
70561ed13e
Minimize the usage of built-in 128-bit ints
...
It usually generates slower code than manual handling.
2022-01-19 17:03:44 -08:00
Ivan Volnov
cdf1a3b530
Fix codecvt warning ( #2408 ) ( #2725 )
2022-01-19 10:26:09 -08:00
Tobias Hellmann
b8b037e930
Fix -Wconversion warning ( #2724 )
...
* - try fixing the warning "chrono.h:1217:37: warning: conversion from 'std::make_unsigned<long long int>::type' {aka 'long long unsigned int'} to 'size_t' {aka 'unsigned int'} may change value [-Wconversion]" by casting int to size_t (occurs when cross-compiling to Raspberry Pi ARMv7)
* - remove call to to_unsigned() because using static_cast<size_t> is enough
2022-01-19 06:31:33 -08:00
matrackif
5985f0a7d2
Fix overflow for chrono durations ( #2722 )
2022-01-17 12:14:59 -08:00
Victor Zverovich
8f8a1a02d5
Fix handling of formattable types implicitly convertible to pointers
2022-01-14 13:42:01 -08:00
Vladislav Shchapov
b02e5af52c
fmt::join support FMT_COMPILE ( #2720 )
2022-01-14 09:58:49 -08:00
Victor Zverovich
4fe6129d6c
Fix FMT_NOEXCEPT definition
2022-01-13 10:20:32 -08:00
Victor Zverovich
7c12118c19
Deprecate buffered_file::fileno
2022-01-12 10:54:44 -08:00
Victor Zverovich
2a09d468da
Use noexcept unconditionally
2022-01-12 09:42:29 -08:00
Victor Zverovich
a126b4d888
Check if right shift is arithmetic
2022-01-11 08:23:30 -08:00
Victor Zverovich
9ff91b18cd
Simplify write_fractional_seconds
2022-01-09 15:08:46 -08:00
Victor Zverovich
d9f045fba1
Fix a UB in chrono
2022-01-09 14:06:13 -08:00
Victor Zverovich
3c98f1a4cd
Comment style
2022-01-08 09:52:39 -08:00
Barry Revzin
6e0f1399d7
Supporting nested format specs for ranges. ( #2673 )
...
* Supporting nested format specs for ranges.
* I dedicate this commit to Eric Niebler.
* clang-format
* PR comments.
* throw -> FMT_THROW
* Need to map every element too.
* Clarifying uncvref_type
* Trying to add a workaround for MSVC.
2022-01-08 09:48:26 -08:00
Alex Guteniev
0102101acc
Make colored print handle UTF-8 ( #2701 )
...
* Fix #2681 - Make detail::print handle UTF-8
* Okay, let's do this Windows-only
* drop extra \0
* yay we can throw!
2022-01-06 16:10:53 -08:00
Victor Zverovich
88ec4e7061
Bump version
2022-01-06 12:32:43 -08:00
Victor Zverovich
739055ae7b
Fix apidocs
2022-01-06 11:06:39 -08:00
Victor Zverovich
dbbd711f46
Suppress a warning
2022-01-05 09:41:35 -08:00
Victor Zverovich
98cbb6a43c
Fix ABI compatiblity issue
2022-01-05 08:08:38 -08:00
Vladislav Shchapov
214cf13f17
Fix endianness bug in write_digit2_separated ( #2699 )
...
* Fix endianness bug in write_digit2_separated
* Move endianness check to compile time if it possible
* Turn 8 into a constant
2022-01-04 14:23:42 -08:00
Julian Rüth
17a5c808da
Restore FMT_API on error_handler::on_error() ( #2696 )
...
this fixes a breaking ABI change that was introduce in the upgrade from
8.0.1 to 8.1.0.
Fixes #2695 .
2022-01-04 10:53:44 -08:00
Richard Berger
fc1783fcc6
Avoid undefined symbols with mingw-w64 ( #2692 )
...
Fixes issue #2691
2022-01-03 15:29:29 -08:00
Victor Zverovich
1b193e7b37
Deprecate more
2022-01-03 11:13:09 -08:00
Victor Zverovich
64dc8fbada
Bump version
2022-01-02 08:34:01 -08:00
Victor Zverovich
89c6ed12bf
Clarify in comments (for now) deprecated map functions
2022-01-01 09:29:50 -08:00
Björn Schäpers
e462da828d
Add some noexcept ( #2684 )
...
I got warnings from -Wnoexcept, fixed them.
2022-01-01 08:44:00 -08:00
Victor Zverovich
bb69201578
Fix tuple join
2021-12-29 14:46:45 -08:00
Victor Zverovich
4fac7daaef
Cleanup bit_cast
2021-12-29 12:14:51 -08:00
Victor Zverovich
9c0c1bcdbd
Simplify tuple formatting
2021-12-29 08:03:12 -08:00
Victor Zverovich
796662a612
Escape range items convertible to std::string_view
2021-12-27 09:38:06 -08:00
Vladislav Shchapov
3bbf2c673c
Fix throw with exceptions disabled
2021-12-26 16:28:41 -08:00
Victor Zverovich
eab2ea9fc2
Replace an assert with an exception
2021-12-26 07:05:45 -08:00
Vladislav Shchapov
04111dd1e4
Fix issue #2670 ( #2671 )
2021-12-23 12:38:48 -08:00
lucpelletier
7812813a32
Don't explicitly delete copy ctor of dynamic_format_arg_store ( #2664 )
...
* Don't explicitly delete copy ctor of dynamic_format_arg_store
Explicitly deleting the copy ctor causes the move constructor to not be
implicitly generated. This behaviour is different than what was in
v8.0.1 and causes code that relied on the move ctor of
dynamic_format_arg_store to break.
* Add test for dynamic_format_arg_store's move ctor
* include <memory>, don't use make_unique
2021-12-23 11:34:16 -08:00
Victor Zverovich
784e2a7b42
Fix an overflow when formatting very large durations
2021-12-23 10:34:32 -08:00
Stefan Weil
fc2a376d8e
Remove two expressions which had no effect (reported by LGTM)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-22 16:29:16 -08:00
Victor Zverovich
eaddd1e3cd
Fix handling of byte
2021-12-19 06:46:24 -08:00
Victor Zverovich
2d44577586
Try fixing byte regression
2021-12-18 08:51:21 -08:00
Alexey Ochapov
e46392ea2c
deprecate _format UDL in code using FMT_DEPRECATED
2021-12-18 08:33:20 -08:00
Victor Zverovich
c882790a2e
Add a set formatter
2021-12-18 07:35:40 -08:00
Victor Zverovich
121002d700
Add a map formatter
2021-12-18 07:12:53 -08:00
Victor Zverovich
be51ee1ceb
Disable broken copy ctor of dynamic_format_arg_store
2021-12-17 17:18:18 -08:00
Victor Zverovich
659de779e6
Fix a UB in parse_format_specs when begin is null
2021-12-17 16:51:24 -08:00
Alexey Ochapov
ef72b471fc
enable named arguments check in compile-time checks ( #2649 )
...
works only if all named arguments are UDL-based
2021-12-17 15:53:05 -08:00
Alexey Ochapov
82246b8766
fix throw with exceptions disabled ( #2647 )
2021-12-17 13:44:36 -08:00
Marek Kurdej
3a951a66cb
Avoid qualifying by inline namespace. Fixes #2642 . ( #2643 )
2021-12-10 08:28:25 -08:00
Marek Kurdej
e0136fc8bd
Qualify calls to make_wformat_args. Fixes #2639 . ( #2641 )
2021-12-10 06:36:42 -08:00
Victor Zverovich
ac1b5f3da5
Refactor problematic trailing returns in arg_mapper
2021-12-09 18:08:30 -08:00
Victor Zverovich
fd62fba985
Don't convert scoped enums to integers
2021-12-09 12:09:33 -08:00
Victor Zverovich
c652f8243a
Make header guard consistent with header name
2021-12-09 10:49:47 -08:00
Victor Zverovich
a9c7b9b8f7
Clarify that _format is deprecated
2021-12-09 10:34:27 -08:00
Victor Zverovich
e4f0564aa6
Disable is_streamable for string[_view]
2021-12-09 10:02:18 -08:00
Victor Zverovich
91533d3c33
Minor tweaks to chrono subsecond formatting
2021-12-09 06:55:31 -08:00
matrackif
0bbc9708f9
Implement c++20 std::chrono::duration subsecond formatting ( #2623 )
...
* Add support for subsecond printing for std::chrono::duration according to the c++20 standard
* Remove assert test that overflows intmax_t
* * Hopefully fix int64_t to int32_t conversion errors.
* Allow proper Duration::rep type to propagate via template argument deduction
* * Hopefully fix int64_t to int32_t conversion errors.
* Allow proper Duration::rep type to propagate via template argument deduction
* Fix sign conversion (-Wsign-conversion) warning treated as error in num_digits()
* Format chrono.h with clang-format
* Remove extra forward slash in doxygen style comment
Co-authored-by: Victor Zverovich <victor.zverovich@gmail.com>
* Apply all suggestions from GitHub, except for replacing the utility subsecond_helper class with a function
* * Move logic of handling subseconds from utility class to function with name write_fractional_seconds()
* Revert write(Rep value, int width) function to previous state
* Fix -Wshadow warning
* Remove unsued get_subseconds() function, its logic has been moved to write_fractional_seconds()
* Change comment from lowercase int to uppercase Int
* Simplify test check
* Integrate suggested changes
* Remove static from detail functions, they are no longer member functions of a class and static is unnecessary.
* Change comment from "amount" to "number"
Co-authored-by: Victor Zverovich <victor.zverovich@gmail.com>
2021-12-09 06:45:13 -08:00
Vladislav Shchapov
9d5b9defde
Enable tzset only on Windows desktop app ( #2633 )
2021-12-07 15:22:36 -08:00
Victor Zverovich
215f21a038
Detect overflow on large precision
2021-12-05 07:26:58 -08:00
Vladislav Shchapov
c240d98ffd
Optimize tm formatting (Non C-locales and %Z) ( #2617 )
...
* Move fmt::detail::formatbuf to format.h
* Replace std::basic_ostringstream to std::basic_ostream with custom formatbuf
* Use tm.tm_zone
2021-12-04 11:02:31 -08:00
Andrew Corrigan
6ab73113fc
Mark grow as FMT_CONSTEXPR20 ( #2630 )
...
resolves https://github.com/fmtlib/fmt/issues/2627
2021-12-03 07:13:30 -08:00
Victor Zverovich
c472a27818
Fix handling of very large precision in fixed format
2021-11-27 08:23:05 -08:00
Alex Guteniev
201971e293
Make MSVC use [[nodiscard]] ( #2615 )
...
* Make MSVC use [[nodiscard]]
* Uniformly detect attributes for __cplusplus and _MSVC_LANG
2021-11-26 07:32:50 -08:00
Florin Iucha
acad8cfab1
Reformat all source code; no functional changes
...
Before adding the format checker, the mainline should be clean, to
avoid false failures.
2021-11-25 09:15:25 -08:00
Florin Iucha
491ba2dda5
Annotate fmt::format and fmt::formatted_size as [[nodiscard]]
...
This prevents accidentally writing fmt::format when fmt::print was
intended. Other than running tests, there's not a good use case for
discarding the formatted output.
2021-11-25 07:30:30 -08:00
Vladislav Shchapov
5abe9e8266
Add platform-specific 'z' formatter
2021-11-25 06:52:39 -08:00
Vladislav Shchapov
be3a3a5aed
Use predefined formats for C-locale
2021-11-25 06:52:39 -08:00
Alex Guteniev
a3ab36c803
Formatting of function pointers, member function pointers, member object pointers... ( #2610 )
2021-11-23 12:55:22 -08:00
Victor Zverovich
43419a4ada
Workaround a bug in gcc
2021-11-19 07:32:42 -08:00
Vladislav Shchapov
c089f7d497
Simplify std::tm formatter
2021-11-14 07:16:22 -08:00
Vladislav Shchapov
aa5517f6b9
Reuse tm_writer in chrono_formatter
2021-11-14 07:16:22 -08:00
Vladislav Shchapov
50140be7ae
Reuse tm_writer in weekday formatter
2021-11-14 07:16:22 -08:00
Victor Zverovich
8b89454994
Improve consistency
2021-11-13 08:59:56 -08:00
Victor Zverovich
5380ff4d88
Detect types convertible to unformattable pointers
2021-11-13 08:26:27 -08:00
Pavel Novikov
094b66e81d
changed locale retrieval way to a fancy one
2021-11-12 12:46:38 -08:00
Vladislav Shchapov
b69ae4854c
Reorder classes ( #2591 )
2021-11-10 17:09:23 -08:00
Pavel Novikov
0b843af56b
sped up chrono.h formatting for cases without providing locale ( #2576 )
2021-11-07 08:52:57 -08:00
lukester1975
12b1d8b14a
Fix precision 0 with std::chrono::duration and added additional tests. ( #2588 )
2021-11-06 08:57:22 -07:00
Olli Lupton
e67f92c55c
Cleanup warnings with nvhpc/21.9. ( #2582 )
...
* Cleanup warnings with nvhpc/21.9.
* Move __NVCOMPILER check.
* Be more explicit.
* Immediately executed lambda.
* Fix shadowing warning.
2021-11-05 12:17:11 -07:00
Victor Zverovich
812733cc96
const qualify format function for systen_clock
2021-10-31 09:41:16 -07:00
Victor Zverovich
028f227752
Handle implicit conversions in write
2021-10-31 08:58:54 -07:00
timkalu
0697c5edb6
FMT_USE_FCNTL can be predefined ( #2573 )
...
'os.h' accepts a predefined FMT_USE_FCNTL override so using FMT with e.g. the NXP toolchain for ARM (e.g. for FreeRTOS) does not have a fcntl() call, but the detection routine does not detect this correctly.
2021-10-30 08:35:48 -07:00
Vladislav Shchapov
1031eedf27
Replacing strftime with std::time_put ( #2550 )
...
* Fix unicode test
* Add xchar support to chrono formatter
* Replace strftime with std::time_put
* Add std::locale support to std::tm formatter
* Use predefined names and formats for C-locale
* Performance improvement
* Make locale-independent and C locale formats consistent among platforms
2021-10-30 08:25:45 -07:00
Vladislav Shchapov
90034e4c4b
Add FMT_ASSERT and validation of values of struct tm members ( #2564 )
...
Switch internal year calculations to long long
2021-10-27 13:29:07 -07:00
Daniela Engert
3b6e409cd8
Enable consteval for msvc 17.0-pre5 ( #2559 )
2021-10-23 07:19:57 -07:00
Axel Kohlmeyer
249f03bbb7
do not detect LLVM based IBMXL compiler (on ppc) as clang ( #2555 )
2021-10-20 06:21:49 -07:00
Vladislav Shchapov
7463c83205
Fix overflow for very bigger years (>2*10^9) ( #2551 )
2021-10-19 07:04:55 -07:00
Victor Zverovich
1266c2b600
Fix handling of exotic character types
2021-10-17 09:07:48 -07:00
Victor Zverovich
684e2fdc94
Minor cleanup
2021-10-17 06:33:27 -07:00
Victor Zverovich
a1d586302f
Minor cleanup
2021-10-17 06:07:03 -07:00
Vladislav Shchapov
7a604cdd98
Cleanup
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
aeb54b0dd9
Fix bug on '%Y' and '%C' formats with negative years
...
Requested changes
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
2eeddba756
Renaming, splitting of functions
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
2754546080
Fix errors in ISO week-base-year formatter
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
e9f4453b0e
Fix Microsoft Visual Studio 14.0 build
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
27c3674ce1
Improve performance
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
f8542cd988
Unified formatters for std::chrono::time_point<std::chrono::system_clock, Duration> and std::tm
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
4707373d33
Fix year formatter
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
79c00ad8f2
Improve ISO week-base-year formatter
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
fbaaa5906b
Improve week of the year formatter
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
cde44ddb72
Improve year formatter
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
b04601b918
Switch from std::strftime/std::wcsftime to internal implementation for locale independent formats
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
7911d8d3f5
Add format spec checker
2021-10-16 15:03:57 -07:00
Vladislav Shchapov
fbbfc3b03c
Reorder formatters
2021-10-16 15:03:57 -07:00
Barry Revzin
7aca36bca4
Extending fmt::join to support C++20-only ranges. ( #2549 )
2021-10-16 10:02:03 -07:00
Josh Essman
febdef43f5
fix: add workaround for intel parameter pack bug
2021-10-14 10:44:24 -07: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
Oliver Lee
9c14474d30
Include <bit> when using std::bit_cast
2021-10-09 06:11:36 -07:00
Roman-Koshelev
7e4bc94510
Speeding up write_significand() ( #2499 )
2021-10-09 05:27:38 -07:00
Pavel Novikov
26c1ca4c3e
Replaced default spec with equivalent one, which is potentially more optimizable ( #2537 )
2021-10-08 07:09:54 -07:00
Vladislav Shchapov
0a985fd4c6
Move size_ initialization to initializer list ( #2529 )
2021-10-02 17:20:33 -07:00
Victor Zverovich
012cc709d0
Workaround gcc _Pragma bug 59884
2021-10-02 15:41:47 -07:00
Victor Zverovich
d6590e3bd2
Fix compiler check
2021-10-02 08:46:18 -07:00
Victor Zverovich
023c2018f7
Don't use strlen in constexpr
2021-10-02 07:17:05 -07:00
Victor Zverovich
800d4c8ac8
Refactor Windows workarounds
2021-10-02 06:06:08 -07:00
Mathias Born
32865aeaab
changed detection of Intel Compiler Classic to distinguish MS-Windows ( #2510 )
...
* changed detection of Intel Compiler Classic to distinguish MS-Windows
* replaced !FMT_ICC_ON_WINDOWS by FMT_ICC_POSIX
removed #pragma manged
* replaced FMT_ICC_POSIX with FMT_ICC_INTRINSIC_BUG to be crystal clear about the macro's purpose
2021-10-02 05:43:41 -07:00
Jonathan W
ae9bbe1169
Suppress warning C4127 in chrono.h (conditional expression is constant) ( #2518 )
2021-09-30 09:14:38 -07:00
Victor Zverovich
2a9a77dd8c
Remove misplaced comment
2021-09-26 18:01:39 -07:00
Victor Zverovich
1aee4bc90a
Refactor FP formatting
2021-09-26 14:37:33 -07:00
Victor Zverovich
e1bd6cc913
Refactor FP formatting
2021-09-26 10:25:46 -07:00
Victor Zverovich
027fcaf05e
Replace use_grisu with fallback since Grisu is only one of multiple implemented algorithms
2021-09-26 08:44:05 -07:00
Victor Zverovich
716d69f27e
Refactor FP formatting
2021-09-26 08:27:18 -07:00
Victor Zverovich
ff7e73af66
Always run grisu_gen_digits before fallback_format
2021-09-26 07:54:25 -07:00
Victor Zverovich
2976e31ac9
Refactor format_float
2021-09-25 11:20:56 -07:00
Victor Zverovich
807ee5ec31
Disable consteval in Apple clang
2021-09-25 05:55:05 -07:00
jk-jeon
9c57357e05
Add static to a table ( #2509 )
2021-09-24 06:25:08 -07:00
Victor Zverovich
2742611cad
Fix formatting
2021-09-18 11:09:24 -07:00
Victor Zverovich
5092b198bc
Document group_digits
2021-09-18 10:50:30 -07:00
Alexey Ochapov
b4d9d82e1d
make FP formatting available to be used at compile-time ( #2426 )
...
* works only with FMT_HEADER_ONLY
* works only with float and double types (not long double)
2021-09-18 08:03:23 -07:00
Vladislav Shchapov
d9fd695ac7
Fix wchar_t tm formatting
2021-09-15 07:33:24 -07:00
Vladislav Shchapov
92614ecbf9
Optimize %T in tm formatting
2021-09-15 07:33:24 -07:00
Victor Zverovich
aaeca12d89
Move FMT_MAYBE_UNUSED to format.h where it is used
2021-09-13 07:51:36 -07:00
Victor Zverovich
3d0c7ae385
Move data to format.cc
2021-09-13 06:23:57 -07:00
Victor Zverovich
04e3a79f76
Use memcpy in more cases in copy2
2021-09-12 12:23:45 -07:00
Roman-Koshelev
e47e99bb09
Simplify format_decimal ( #2498 )
...
* Add copy2() constexpr
* Removed redundant format_decimal implementation for constexpr context
2021-09-12 10:36:06 -07:00
Victor Zverovich
9b6b0e403c
Remove data
2021-09-12 09:46:00 -07:00
Victor Zverovich
4d1c6034eb
Deprecate basic_data
2021-09-12 09:37:23 -07:00
Victor Zverovich
a3348eccdd
Deprecate most of basic_data
2021-09-12 08:59:39 -07:00
Victor Zverovich
3a04481485
Remove data::hex_digits
2021-09-11 17:54:40 -07:00
Victor Zverovich
ad77331c04
Move log10_2_significand to format-inl.h
2021-09-11 09:36:23 -07:00
Victor Zverovich
d9ebc4e821
Add a function to get sign char
2021-09-11 09:17:59 -07:00
Victor Zverovich
c00eb4f4c6
Add missing inline
2021-09-10 09:01:18 -07:00
Victor Zverovich
67cb2dad37
Optimize %F in tm formatting
2021-09-10 07:48:50 -07:00
Roman-Koshelev
1aa98f8b93
Eliminate double copying in vformat_to_n ( #2489 )
2021-09-09 08:10:29 -07:00
Victor Zverovich
a58c133821
Improve code_point_length codegen on older gcc
2021-09-07 19:34:13 -07:00
Victor Zverovich
aeee70a815
Remove unnecessary cast
2021-09-07 10:53:43 -07:00
Jean-Michaël Celerier
c771ba361c
Fix build for the clang-10 / libstdc++-9 couple ( #2491 )
2021-09-07 08:52:34 -07:00
Victor Zverovich
ab6e2272cc
Clarify shifts encoding
2021-09-06 18:45:34 -07:00
Victor Zverovich
e4728409e7
Use throw_format_error in more places to reduce bloat
2021-09-06 16:42:17 -07:00
Victor Zverovich
e3ebf366a6
Inline padding shifts
2021-09-06 16:26:50 -07:00
Victor Zverovich
894faf3fed
Refactor presentation types
2021-09-06 13:32:33 -07:00
Victor Zverovich
4eb97fa4e3
Reduce code bloat
2021-09-05 16:24:20 -07:00
Victor Zverovich
6b55c83252
is_const_formattable -> has_const_formatter
2021-09-05 08:35:08 -07:00
Victor Zverovich
2fe94ad7e3
Make specifiers support in tuple_join an opt-in
2021-09-05 07:34:06 -07:00
Victor Zverovich
3940de5952
thousands -> group_digits
2021-09-05 06:47:18 -07:00
Victor Zverovich
c4d0f96a6d
Implement format specs in fmt::thousands
2021-09-04 06:56:51 -07:00
Victor Zverovich
3b9c442689
Implement thousands separators without locales
2021-09-04 06:32:46 -07:00
Victor Zverovich
08f98c7fac
Simplify get_arg_index_by_name
2021-09-03 21:17:36 -07:00
Victor Zverovich
a151f955a0
Remove FMT_OVERRIDE
2021-09-03 18:15:17 -07:00
Victor Zverovich
42a225cbd9
Remove redundand final
2021-09-03 17:33:26 -07:00
Victor Zverovich
bf20d19901
Simplify the core API
2021-09-03 16:57:33 -07:00
Victor Zverovich
fc0884037e
Move FMT_GCC_VISIBILITY_HIDDEN to format.h
2021-09-03 16:34:42 -07:00
Victor Zverovich
1aeed2dbca
Require inline namespaces
2021-09-03 15:59:23 -07:00
Victor Zverovich
799bea4730
Remove FMT_HAS_GXX_CXX11
2021-09-03 15:49:40 -07:00
Victor Zverovich
60cd5ea3f2
Add support for more formattable types in ranges
2021-09-03 14:55:41 -07:00
Victor Zverovich
4fd9a00f35
Simplify ostream interface
2021-09-03 13:07:54 -07:00
Victor Zverovich
5681563898
Cleanup ostream interface
2021-09-03 10:35:19 -07:00
Victor Zverovich
20931baf1d
Disable fallback_formatter for arrays
2021-09-03 08:59:36 -07:00
Pierre-Antoine Lacaze
d58d19ba32
Fix an odr violation in ranges.h ( #2483 )
...
* Add a testcase demonstrating ODR violation in ranges.h
* Fix ODR violation in ranges.h
* Fix comments
Co-authored-by: Pierre-Antoine Lacaze <pa.lacaze@gmail.com>
2021-09-02 08:47:44 -07:00
Victor Zverovich
ee0659f8b6
Fix formatting of abstract classes via ostream
2021-09-02 08:19:12 -07:00
Roman-Koshelev
8029bf955c
Fix copy_str performance ( #2477 )
2021-09-02 07:25:26 -07:00
Max
2520f410c8
Workaround for #2478 ( #2482 )
...
_MSC_VER 1911 (Visual Studio 2017 15.3)
2021-09-02 07:13:30 -07:00
Vladislav Shchapov
ee63f5f04e
Workaround to MSVC bug ( #2474 ) ( #2476 )
2021-08-31 07:54:42 -07:00
Victor Zverovich
1aaf72fb6d
Add an example to fmt::runtime
2021-08-29 12:10:40 -07:00
Victor Zverovich
c1313c2057
Clarify that format_to[_n] do not append a terminating null
2021-08-29 12:07:35 -07:00
Victor Zverovich
71677e5204
Improve docs
2021-08-29 11:21:38 -07:00
Victor Zverovich
419ba86a91
Improve docs
2021-08-28 16:54:58 -07:00
Victor Zverovich
6a5b4d5faf
Document format_string
2021-08-28 16:51:48 -07:00
Victor Zverovich
729a44e67d
Depreate strtod and remove problematic tests
2021-08-28 09:20:36 -07:00
Victor Zverovich
74c1118964
Apply force inline
2021-08-26 21:17:35 -07:00
Victor Zverovich
596508a928
Cleanup
2021-08-26 20:56:28 -07:00
Victor Zverovich
043e3b3429
Remove static_assert from arg_mapper
2021-08-26 20:45:01 -07:00
Victor Zverovich
8b0cb944da
Fix error reporting when mixing character types
2021-08-26 18:16:05 -07:00
Alexey Ochapov
c79a3841e8
make detail::fp and detail::bigit constexpr
2021-08-26 17:16:45 -07:00
Alexey Ochapov
5888de9f34
make detail::make_checked() constexpr
2021-08-26 17:16:45 -07:00
Alexey Ochapov
04b4b69b11
make detail::bit_cast() constexpr with C++20
2021-08-26 17:16:45 -07:00
Alexey Ochapov
fd34a3d246
make detail::basic_memory_buffer constexpr with C++20
2021-08-26 17:16:45 -07:00
Victor Zverovich
6d597e39c3
Fix overload ambiguity in arg_mapper
2021-08-26 16:54:27 -07:00
Victor Zverovich
b9ce56d936
Improve comments
2021-08-26 16:30:58 -07:00
Victor Zverovich
f889e52a15
Improve error reporting
2021-08-26 15:47:44 -07:00
Victor Zverovich
34caecd6b6
Use consistent initialization style
2021-08-23 10:10:56 -07:00
sunmy2019
a44c8f651b
reimplement formatter<tuple_join_view> ( #2457 )
...
* reimplement `formatter<tuple_join_view>`
1. completely reimplement `formatter<tuple_join_view<Char, T...>, Char>`
2. Add some tests
* use FMT_THROW
2021-08-23 09:51:19 -07:00
owent
4b8bda25c0
Fix 2462
...
Signed-off-by: owent <admin@owent.net>
2021-08-23 06:31:10 -07:00
Victor Zverovich
2207ea0b36
More escaping
2021-08-22 16:54:26 -07:00
Victor Zverovich
a212ff757f
Escape invalid code points
2021-08-22 15:51:33 -07:00
Victor Zverovich
a76031e11d
check -> is_printable
2021-08-22 13:23:38 -07:00
Victor Zverovich
a7f280765c
Improve naming
2021-08-22 12:44:00 -07:00
Victor Zverovich
07d033ecb4
Fix is_printable
2021-08-22 10:37:18 -07:00
Victor Zverovich
cdb4299acb
Add Unicode support to is_printable
2021-08-22 09:11:35 -07:00
Victor Zverovich
371d8e2ee0
Escape Unicode
2021-08-22 07:55:59 -07:00
Victor Zverovich
6397095ca4
More escaping
2021-08-21 16:36:25 -07:00
Victor Zverovich
f69a572538
Don't overescape wide strings
2021-08-19 17:25:16 -07:00
Victor Zverovich
11b07a56b2
We should escape
2021-08-19 14:50:59 -07:00
Victor Zverovich
b559cfd4c0
Implement basic escaping
2021-08-19 14:12:26 -07:00
Victor Zverovich
11d49491cb
Handle global locale
2021-08-14 09:38:41 -07:00
Victor Zverovich
6ea6cf9464
Add decimal separator support to float
2021-08-14 09:16:26 -07:00
Chris White
7b66e72e2c
Use builtin intrinsics on intel ( #2450 )
2021-08-11 06:22:02 -07:00
Victor Zverovich
d57b2a6525
Suppress a warning
2021-08-08 09:18:46 -07:00
Victor Zverovich
bdfbd794e3
Cleanup begin/end usage
2021-08-07 08:55:01 -07:00
Victor Zverovich
111de881fa
Don't copy non-const-iterable ranges
2021-08-07 07:34:02 -07:00
Cory Quammen
f488eed101
Resolve default constructor error in Xcode 7.2.1 and 8.2.1
...
Fix issue that produces the error 'default initialization of an object
of const type 'const detail::buffer_size' without a user-provided
default constructor'
2021-08-06 11:17:02 -07:00
Victor Zverovich
bba0a9d962
Make flush public
2021-07-30 07:02:49 -07:00
brm
0544a2279b
Exclude fallback functions when FMT_BUILTIN_CLZ(LL) is not defined ( #2434 )
2021-07-25 10:37:18 -07:00
Victor Zverovich
5c222f0561
Add support for nonconst formattable types
2021-07-24 09:53:53 -07:00
Spiros Tsalikis
63fe2d5bd2
Add copy constructor for dynamic_format_arg_store, and test
2021-07-23 09:35:09 -07:00
Victor Zverovich
561834650a
Improve digit count
2021-07-18 09:14:56 -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
Victor Zverovich
e41ac1f875
Don't use deprecated API in docs
2021-07-10 13:42:51 -07:00
Victor Zverovich
8465869d7b
Move ignore_unused to detail
2021-07-09 08:24:11 -07:00
Victor Zverovich
20e4ef8b4c
Pass significand_size by value
2021-07-05 08:51:43 -07:00
Victor Zverovich
c4a3c2342a
Refactor locale handling
2021-07-05 08:25:12 -07:00
Benoît Lormeau
02ad5e11da
Add faint, blink, reverse and conceal to the emphases ( #2394 )
2021-07-02 20:03:55 -07:00
Victor Zverovich
cfc05e05f0
Bump version
2021-07-02 14:43:31 -07:00
Victor Zverovich
e461f3dbbe
Minor consitency and comment tweaks
2021-07-02 13:56:37 -07:00
Mattias Ljungström
54014e42e3
silence warning C4100 on MSVC 2019 when exceptions are disabled ( #2397 )
2021-07-02 13:51:49 -07:00
Victor Zverovich
3e7a29cc92
Workaround clang/gcc incompatibility
2021-07-02 13:29:22 -07:00
Victor Zverovich
1d7384530e
Add missing presentation type checks for std::string ( #2402 )
2021-07-02 07:51:04 -07:00
Jonathan Emmett
889bbf27a2
Fix missing std::get overload in MSVC ( #2407 )
...
This replaces the `std::get` call with an unqualified equivalent to allow
it to be treated as a dependent call.
ranges.h needs std::get overloads from `<tuple>` but does not directly
include it. This causes compilation failures in MSVC with /permissive-.
On other platforms `<tuple>` is included as a dependency from other headers
(specifically from `<memory>`), but there is no such implicit dependency in
MSVC's STL.
Fixes #2401
2021-07-01 10:55:46 -07:00
Victor Zverovich
5f8473914c
Remove outdated apidoc
2021-07-01 07:56:53 -07:00
Victor Zverovich
785908ee37
Fix warnings
2021-06-30 06:42:29 -07:00
Greg Sjaardema
fbb70eec5c
suppress unused variable warnings ( #2381 )
...
* suppress unused variable warnings
An arguably better method for suppressing unused variable warnings. The `(void)var` method does not work on many intel compiilers.
This is from Herb Sutter's blog post https://herbsutter.com/2009/10/18/mailbag-shutting-up-compiler-warnings/
* Format to eliminate long lines
* Run clang-format
2021-06-30 06:33:30 -07:00
Javier Honduvilla Coto
002bb759ff
Remove unneeded num_result_bigits decrement
...
For what I see this seems unused?
2021-06-29 06:23:02 -07:00
Marek Kurdej
a3f762c5aa
[doc] Minor: fix `code`.
2021-06-29 06:21:15 -07:00
Eren Okka
c3c27e5ab5
Fix MSVC warning C4819
2021-06-28 06:14:53 -07:00
Aidan Sun
f85fb9fdff
Adjust definition for FMT_HAS_INCLUDE
...
Adjust definition for FMT_HAS_INCLUDE
Remove check for `!FMT_MSC_VER`
2021-06-27 07:08:29 -07:00
Patrick Geltinger
49a3b58c8b
Specify size for static data arrays
2021-06-26 06:55:24 -07:00
Jason A. Donenfeld
c9a10631cb
format: do not use udl_{arg,formatter} return types when UDL is not in use
...
The udl_{arg,formatter} structs are only defined when
FMT_USE_USER_DEFINED_LITERALS is set, so don't try to define things that
return that struct when it's not defined.
2021-06-26 06:25:16 -07:00
Greg Sjaardema
3bd806f12f
Eliminate intel compiler warning
...
The intel compiler defines `__GNUC__`, but does not support the gcc `_Pragma`. This PR filters out the intel compiler to avoid warnings about an unrecognized function.
2021-06-26 06:16:12 -07:00
Daniela Engert
5221242f6e
Instruct msvc to report the _true_ value in __cplusplus and force _full_ C++ conformance
...
* do this in _some_ tests to improve test coverage and catch possible problems due to that
* fix invalid export of `static constexpr` constant
* fix msvc warnings about unreachable code in high warning levels
2021-06-24 09:10:08 -07:00
Victor Zverovich
31a5f0d399
Bump version in inline namespace
2021-06-22 14:47:59 -07:00
Victor Zverovich
102a4d492a
Bump version in inline namespace
2021-06-22 07:04:02 -07:00
Victor Zverovich
92fec0f050
Bump version
2021-06-21 05:57:50 -07:00
Victor Zverovich
427b534054
Add no_value state to value
2021-06-15 07:53:28 -07:00
Victor Zverovich
e421d52713
Simplify error handling in parse_nonnegative_int
2021-06-14 16:05:37 -07:00
Владислав Щапов
a59678f376
Fix chrono_test.locale
...
UTF-8: https://datatracker.ietf.org/doc/html/rfc3629
2021-06-14 09:41:08 -07:00
Владислав Щапов
c123a72844
Fix set locale error in chrono formatter
2021-06-14 09:41:08 -07:00
Victor Zverovich
3c8fad126c
Optimize parse_nonnegative_int
2021-06-13 19:20:44 -07:00
sunmy2019
f28cf3302d
adding a default format for std::chrono::time_point<std::chrono::syst… ( #2345 )
2021-06-11 10:52:39 -07:00
Daniela Engert
55010a9d3a
Support non-char overloads (module)
2021-06-11 09:38:53 -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
Victor Zverovich
3423d75475
Remove the msvc workaround ( #2351 )
2021-06-11 06:20:25 -07:00
Victor Zverovich
dccddc2bdb
Apply clang-format
2021-06-07 08:49:47 -07:00
Victor Zverovich
0e36681b8e
Cleanup digit count
2021-06-07 07:42:22 -07:00
Victor Zverovich
1de80f5b22
Workaround lack of static constexpr in constexpr functions
2021-06-07 07:27:56 -07:00
Victor Zverovich
2039dce75f
Detect consteval
2021-06-07 06:57:43 -07:00
Victor Zverovich
d551b88a6d
Move is_char specializations to xchar.h
2021-06-06 15:32:30 -07:00
Victor Zverovich
206000a017
Workaround pathological conversion ( #2343 )
2021-06-06 07:18:44 -07:00
Victor Zverovich
76ee490468
Move wchar/custom char overloads to xchar.h
2021-06-05 22:57:45 -07:00
Victor Zverovich
e77b22d6da
Deprecate memory buffer overload of format_to
2021-06-05 14:58:36 -07:00
Victor Zverovich
4678192c88
Remove bsr2log10
2021-06-04 21:33:05 -07:00
Victor Zverovich
7c3d3dfa29
Update thousands_sep_impl signature
2021-06-04 21:12:47 -07:00
Victor Zverovich
5223f552c8
Remove FMT_ALWAYS_INLINE
2021-06-04 20:29:54 -07:00
Victor Zverovich
cfde93afe0
Add FMT_STATIC_CONSTEXPR
2021-06-04 16:50:09 -07:00
Cristi
986a5a6c2c
Fixed join_view formatter for wchar_t
2021-06-04 14:50:45 -07:00
Tobias Ribizel
7c8b35ff32
fix MSVC Win32 count_digits
2021-06-04 11:06:25 -07:00
Victor Zverovich
3eeb084e71
Optimize count_digits
2021-06-04 09:14:58 -07:00
Victor Zverovich
2ac0bfe59e
Improve handling of thousands separator
2021-06-04 06:12:44 -07:00
Victor Zverovich
f4c95f6dd9
Improve handling of thousands separator
2021-06-03 18:25:08 -07:00
Victor Zverovich
0eef389ddb
Code style
2021-06-03 18:25:08 -07:00
Victor Zverovich
11addaa16e
Update docs
2021-06-03 06:24:17 -07:00
Victor Zverovich
290d3f8b61
Cleanup ranges API
2021-06-02 17:06:02 -07:00
Victor Zverovich
d142579e97
Cleanup the format API
2021-06-02 16:25:21 -07:00
Владислав Щапов
f286139d22
Fix "undefined reference to `fmt::v7::detail::basic_data<void>::digits'"
...
Remove unused FMT_EXTERN_TEMPLATE_API
2021-06-02 14:33:17 -07:00
Victor Zverovich
a04e3a2dc8
Comment
2021-06-01 20:47:16 -07:00
Victor Zverovich
87876d5474
Cleanup the printf implementation
2021-06-01 20:32:56 -07:00
Victor Zverovich
d338d66324
Cleanup the printf implementation
2021-06-01 19:30:46 -07:00
Victor Zverovich
272660e704
Remove deprecated printf functions
2021-06-01 18:08:31 -07:00
Victor Zverovich
ad97258915
Merge branch 'master' of github.com:fmtlib/fmt
2021-06-01 13:38:26 -07:00
Victor Zverovich
ed2a6377e7
Workaround msvc constexpr issues
2021-06-01 13:32:44 -07:00
Alexey Ochapov
9976869549
fix custom types formatting at compile-time, add test
2021-06-01 11:16:05 -07:00
Victor Zverovich
8c1b22ba6d
Workaround a gcc 9.1 bug ( #2334 )
2021-06-01 06:43:30 -07:00
Daniela Engert
d7ba6c3ea8
Use qualified name-lookup in module. ( #2324 )
...
Allow lookup of non-exported names from local classes in function templates.
2021-05-31 09:11:24 -07:00
Victor Zverovich
11a14db286
Update format_to taking a buffer and remove undocumented vformat_to overload
2021-05-30 07:57:51 -07:00
Victor Zverovich
832ec098fc
Fix argument order in locale overload of vformat_to ( #2327 )
2021-05-30 06:42:09 -07:00
Victor Zverovich
486a80e8ef
Move wchar_t overloads to xchar.h
2021-05-30 06:41:39 -07:00
Victor Zverovich
5a2b88f6e9
Reduce binary size
2021-05-29 16:45:43 -07:00
Daniela Engert
00a39ad5f8
Enable Char types other than char ( #2323 )
2021-05-29 11:42:16 -07:00
Victor Zverovich
ff37e41625
wchar.h -> xchar.h because it handles other code unit types too
2021-05-29 09:37:17 -07:00
Victor Zverovich
0901176fe4
arg_join -> join_view
2021-05-29 08:47:16 -07:00
Victor Zverovich
a9a9018191
Move wmemory_buffer to wchar.h
2021-05-29 08:26:04 -07:00
Victor Zverovich
9d67988aed
FMT_DEPRECATED_WCHAR -> FMT_DEPRECATED_INCLUDE_WCHAR
2021-05-29 06:41:07 -07:00
Daniela Engert
126c8cb46b
Export os.h API, too ( #2318 )
2021-05-28 09:27:45 -07:00
Matthias Liedtke
98b9ff47a1
Align hex floats right as default ( #2317 )
2021-05-28 09:21:01 -07:00
Liedtke
a70a4ae053
Ignore zero-padding for non-finite floating points ( #2310 )
...
* Ignore zero-padding for non-finite floating points
* keep width for non-finite formatting with 0-padding
* clang-format
* preserve alignment
* align code-style
2021-05-27 14:13:05 -07:00
Victor Zverovich
4e21baff43
Simplify get_units
2021-05-26 18:26:00 -07:00
John Melas
ca466374bd
qualify make_format_args ( #2315 )
...
Co-authored-by: John Melas <john@jmelas.gr>
2021-05-26 06:42:02 -07:00
Victor Zverovich
5a2a185682
Make buffers non-movable
2021-05-25 17:30:17 -07:00
Alexey Ochapov
ee52a6dc40
add fmt::print() overload to support compiled format ( #2304 )
2021-05-25 14:54:56 -07:00
sven-herrmann
82607efb57
Fixed int conversion warning ( #2313 )
...
* Fixed int conversion warning
Compiler warns about conversion from int to size_t, thus added explicit cast.
* now using detail::to_unsigned for the cast
2021-05-25 08:13:39 -07:00
Victor Zverovich
35a2c2a743
Refactor chrono formatting
2021-05-25 06:57:47 -07:00
Victor Zverovich
b955e7a6b2
Refactor chrono formatting
2021-05-24 15:33:33 -07:00
Victor Zverovich
883d9595c5
Support alternative locale names in tests
2021-05-24 14:09:19 -07:00
Victor Zverovich
1cd9899cf3
Add initial support for weekday formatting
2021-05-24 10:21:34 -07:00
Victor Zverovich
dd8f38fcbb
Cleanup printf API
2021-05-23 20:30:26 -07:00
Victor Zverovich
a216f2562d
Remove undocumented and obsolete vprintf overload
2021-05-23 20:15:02 -07:00
Victor Zverovich
0c0926395d
Add is_exotic_char trait
2021-05-23 19:50:17 -07:00
Daniela Engert
8ec0b9e33b
Do *not* export namespace detail
2021-05-23 06:49:07 -07:00
Victor Zverovich
703005c8ba
Deprecate locale.h
2021-05-22 10:21:17 -07:00
Victor Zverovich
51f0178625
Cleanup the format API
2021-05-22 07:09:09 -07:00
Victor Zverovich
5d59dcf66e
Remove deprecated aliases / undeprecate has_formatter
2021-05-22 06:53:34 -07:00
Victor Zverovich
c242dd402c
Move cerrno include to where it is used
2021-05-22 06:18:40 -07:00
Victor Zverovich
1c83a49be9
Simplify buffer extraction
2021-05-21 20:15:56 -07:00
Victor Zverovich
2617384d8e
Improve buffer extraction
2021-05-21 19:44:49 -07:00
Victor Zverovich
34b8acaef7
More wchar_t-specific API to wchar.h
2021-05-21 18:24:39 -07:00
Victor Zverovich
6326c18906
Improve code style consistency
2021-05-21 17:29:15 -07:00
Matthew Gilbert
5c4b0c86fb
Add missing Allocator template argument for basic_memory_buffer in format_to
...
Remove deduced default template arguments in format_to and moves the
SFINAE check to a non-deduced template parameter.
2021-05-21 12:13:46 -07:00
Victor Zverovich
00149c0b6a
Move detail::null to chrono where it is used
2021-05-21 09:16:45 -07:00
Victor Zverovich
c5c968cb22
Improve binary size
2021-05-21 08:50:35 -07:00
Victor Zverovich
18af1dc460
Fix binary size regression caused by b268f88
2021-05-20 18:33:45 -07:00
Victor Zverovich
d1e6f0f8c6
Fix binary size regression caused by b268f88
2021-05-20 18:00:19 -07:00
Daniela Engert
6e2e6b796f
Restore support for wchar_t overloads in module
2021-05-20 10:03:58 -07:00
Victor Zverovich
24b677d053
Improve symbol sizes
2021-05-20 07:21:20 -07:00
Victor Zverovich
63271a51c4
Fix ADL issues
2021-05-20 06:31:43 -07:00
Victor Zverovich
61b4c923d7
Reduce code bloat
2021-05-20 05:51:45 -07:00
Michael Winterberg
2a2e4c5801
addressing nits.
2021-05-19 16:09:49 -07:00
Michael Winterberg
be48f4d657
Avoid unwanted sign extensions from MSVC in is_utf8.
...
Microsoft's constexpr evaluator treats the type of micro[0] and micro[1] as
plain char, and so sign extends before comparing them to ints.
The normal compiler, including the optimizer, does not fail in this way,
so this is merely a "future proof" change in case someone uses is_utf8()
in a constant expression.
2021-05-19 16:09:49 -07:00
Sergiu Deitsch
13e652939b
export missed symbols
...
Enable `-fvisibility=hidden` and `-fvisibility-inlines-hidden` by default in CI builds to ensure all public symbols are exported correctly.
2021-05-19 16:03:45 -07:00
Jessy De Lannoit
71fb113818
fix compile error on msvc preview 4 (16.10) involving lookup clash /w STL
2021-05-19 13:17:20 -07:00
Victor Zverovich
08d22503bb
Remove outdated comments
2021-05-19 11:47:21 -07:00
Victor Zverovich
95c358f721
Improve separation between code unit types
2021-05-19 09:06:57 -07:00
Victor Zverovich
39c3c4ec22
Simplify the core API
2021-05-19 08:32:57 -07:00
Victor Zverovich
e9c1c415b8
Improve compile-time checks
2021-05-19 07:57:57 -07:00
Victor Zverovich
21d93bfd33
Move generic format functions to format.h
2021-05-18 19:01:43 -07:00
Victor Zverovich
9a92eb4158
Move more wchar overloads to wchar.h
2021-05-18 05:53:25 -07:00
Victor Zverovich
0dd91e20d5
Add wchar.h for wide char overloads
2021-05-17 21:59:10 -07:00
Victor Zverovich
ce14eafc24
Simplify format string checks
2021-05-17 19:25:50 -07:00
Victor Zverovich
8d70c0edab
Refactor the format API
2021-05-17 18:25:36 -07:00
Victor Zverovich
813ac49543
More API cleanups
2021-05-17 07:58:13 -07:00
Victor Zverovich
4ab01fb198
Cleanup printf API
2021-05-17 07:19:50 -07:00
Victor Zverovich
d5036b11b1
Remove deprecated APIs
2021-05-17 06:59:46 -07:00
Victor Zverovich
2581946231
Cleanup the core API
2021-05-16 13:02:01 -07:00
Victor Zverovich
b35db4e006
Improve handling of 128-bit ints
2021-05-16 11:43:44 -07:00
Victor Zverovich
d35f1ad5c1
Cleanup core
2021-05-16 10:02:33 -07:00
Victor Zverovich
8f1902c05a
Move format string checks to core.h
2021-05-16 07:08:49 -07:00
Daniela Engert
6469b9037c
Silence msvc warning about an unused named parameter
...
Warning C4100 may cause compile failures under strict warning regimes.
2021-05-16 06:14:30 -07:00
Daniela Engert
5466373a11
Do *not* export namespace detail
...
Introduce `FMT_BEGIN_DETAIL_NAMESPACE` and `FMT_END_DETAIL_NAMESPACE` for `namespace detail` sections embedded in that part of the code that contains all declarations that are exported from the module, i.e. which is enclosed by `FMT_MODULE_EXPORT_BEGIN` and `FMT_MODULE_EXPORT_END`. Given a correct implementation of C++20 modules, neither the name `fmt::detail` nor any of its contents will become visible outside of the module.
2021-05-15 12:08:42 -07:00
Victor Zverovich
588bdb5404
Simplify get_arg_index_by_name
2021-05-15 06:47: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
57280762b6
Move specs checker to core.h
2021-05-13 19:33:09 -07:00
Victor Zverovich
ced3037523
Move dynamic specs to core.h
2021-05-13 19:01:21 -07:00
Victor Zverovich
dd2bc998ab
Move specs to core.h
2021-05-13 18:48:15 -07:00
Victor Zverovich
08da1adcf6
Remove unused headers
2021-05-13 17:58:15 -07:00
Victor Zverovich
3be0cc2087
Fix handling of 128-bit ints
2021-05-13 17:53:23 -07:00
Victor Zverovich
d1aebdbde0
Inline format_to
2021-05-12 18:07:59 -07:00
Victor Zverovich
02896dabee
Avoid use after move ( #2278 )
2021-05-11 16:58:07 -07:00
Владислав Щапов
0036a1d195
Fix issue #2274 .
2021-05-10 15:57:23 -07:00
Владислав Щапов
2a9b314627
Replace fmt::error_code to std::error_code
2021-05-09 12:26:19 -07:00
Victor Zverovich
4862930845
Optimize format string compilation
2021-05-09 09:15:55 -07:00
Victor Zverovich
3207a8bbbf
Get rid of unnecessary recursion to enable inlining
2021-05-09 07:54:13 -07:00
Victor Zverovich
6214f15a0c
Optimize standard formatter specialization
2021-05-09 07:11:35 -07:00
Victor Zverovich
cd2c78fb8a
Use write directly in formatter specializations
2021-05-09 07:07:51 -07:00
Владислав Щапов
4211d86539
Add a formatter specialization for std::error_code.
2021-05-09 06:29:39 -07:00
Victor Zverovich
84feeb0f36
Remove redundant comments and put common case check first
2021-05-07 17:14:29 -07:00
Victor Zverovich
d0abe7c246
Make chrono formatting locale-independent by default
2021-05-07 16:14:10 -07:00
Victor Zverovich
50fb0b5eae
Fix formatting
2021-05-07 08:52:49 -07:00
Victor Zverovich
16f2ef91ab
Replace fmt::system_error with std::system_error
2021-05-07 08:33:39 -07:00
Victor Zverovich
4b885c8633
Replace windows_error with system_error
2021-05-07 06:19:03 -07:00
Victor Zverovich
5238055f40
Move esoteric char type support to format.h
2021-05-06 09:02:00 -07:00
Victor Zverovich
849c9f6168
Move is_name_start to core
2021-05-06 08:12:24 -07:00
Victor Zverovich
23892caf53
Move more parsing to core
2021-05-06 07:37:40 -07:00
Victor Zverovich
8e6390c32c
Move FMT_STRING to core
2021-05-06 07:19:41 -07:00
Victor Zverovich
51a33713fc
Move parsing to core
2021-05-06 07:01:29 -07:00
Victor Zverovich
9d7b53cb9b
Remove redundant formatter specialization for byte
2021-05-05 08:14:12 -07:00
Victor Zverovich
f0095ccd34
Add support for ranges of types without formatters to join ( #2262 )
2021-05-05 07:43:46 -07:00
Victor Zverovich
4f0eadfce4
Exclude fallback from is_formattable
2021-05-05 06:29:51 -07:00
Victor Zverovich
400b953fbb
Use [] instead of {} in ranges for consistency with Python format
2021-05-04 21:04:21 -07:00
Victor Zverovich
38bcc04a11
Drop range limit and cleanup tests
2021-05-04 20:53:56 -07:00
Victor Zverovich
9155e2de4c
Cleanup tests
2021-05-01 17:11:45 -07:00
Victor Zverovich
c9c0e5077d
Cleanup tests
2021-04-30 06:42:38 -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
Daniela Engert
342973b349
Make wchar_t overloads usable in module
...
Bring ''detail::find()' into scope.
2021-04-28 09:37:57 -07:00