Commit Graph

1325 Commits

Author SHA1 Message Date
Victor Zverovich
35c0286cd8 Simplify byte handling 2022-02-02 16:13:24 -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
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
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
04eea0f0a8 Remove now-unused stuffs 2022-01-19 17:03:44 -08:00
Vladislav Shchapov
b02e5af52c fmt::join support FMT_COMPILE (#2720) 2022-01-14 09:58:49 -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
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
Victor Zverovich
1b193e7b37 Deprecate more 2022-01-03 11:13:09 -08:00
Victor Zverovich
4fac7daaef Cleanup bit_cast 2021-12-29 12:14:51 -08:00
Alexey Ochapov
e46392ea2c deprecate _format UDL in code using FMT_DEPRECATED 2021-12-18 08:33:20 -08:00
Victor Zverovich
fd62fba985 Don't convert scoped enums to integers 2021-12-09 12:09:33 -08:00
Victor Zverovich
a9c7b9b8f7 Clarify that _format is deprecated 2021-12-09 10:34:27 -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
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
Victor Zverovich
43419a4ada Workaround a bug in gcc 2021-11-19 07:32:42 -08: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
028f227752 Handle implicit conversions in write 2021-10-31 08:58:54 -07:00
Barry Revzin
7aca36bca4 Extending fmt::join to support C++20-only ranges. (#2549) 2021-10-16 10:02:03 -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
Vladislav Shchapov
0a985fd4c6 Move size_ initialization to initializer list (#2529) 2021-10-02 17:20:33 -07:00
Victor Zverovich
d6590e3bd2 Fix compiler check 2021-10-02 08:46:18 -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
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
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
Victor Zverovich
aaeca12d89 Move FMT_MAYBE_UNUSED to format.h where it is used 2021-09-13 07:51:36 -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
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
aeee70a815 Remove unnecessary cast 2021-09-07 10:53:43 -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
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