Commit Graph

5837 Commits

Author SHA1 Message Date
Victor Zverovich
7fb8d33f9d Fix compile-time width/precision type check 2022-08-09 16:10:02 -07:00
Dimitrij Mijoski
8bd02e93b2 Reduce conditional compilation 2022-08-09 09:05:01 -07:00
Dimitrij Mijoski
d9c1c7353a Use is_utf8() in print(std::ostream&, ...)
This patch concludes the Unicode support for print(ostream&, ...)
2022-08-09 09:05:01 -07:00
Vladislav Shchapov
682e097bee Remove -Wl,--as-needed linker option
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-07 06:51:41 -07:00
Hannes Friederich
b9087ee587 Suppress unused typedef warning 2022-08-05 15:27:01 -07:00
Victor Zverovich
df56fdf883 Clarify docs for compile-time checks 2022-08-05 07:00:34 -07:00
Vladislav Shchapov
90c48b8525 Remove double code execution
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
5a8b7cd742 Add comment
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
36a25d75b4 Reuse detail::string_literal in the chrono formatter
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
6c9304b2c2 Replace ParseContext with basic_format_parse_context
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
24ab9dd19e Remove duplicate method
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
a95dc17017 Remove unused condition
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-05 06:15:59 -07:00
Victor Zverovich
5f774c0aed I shouldn't be there 2022-08-02 16:35:50 -07:00
Victor Zverovich
6567df7f24
Update README.rst 2022-08-02 06:50:09 -07:00
Vladislav Shchapov
6c6b1fbf6e Workaround a bug in MSVC
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-02 06:46:02 -07:00
Dimitrij Mijoski
9beddd08f9 Improve CI on Windows 2022-08-02 06:46:02 -07:00
Victor Zverovich
6452e3c9eb Fix a typo in example 2022-08-02 06:26:19 -07:00
Dimitrij Mijoski
756822ba39
Fix Unicode handling for ostream under Windows with libc++. (#3001)
Also replaces the SFIANE tricks applied in
ce7ecdb7af with conditional compilation.
The code was too complicated along with the other trick to access private
data members.
2022-07-30 06:49:21 -07:00
Barry Revzin
0b2862a1e4
Range formatter (#2983)
* Implement range_formatter and format_kind

* Attempted gcc 4.8 fix

* gcc 4.8 interprets inaccessible as a hard error (instead of... not available)

* Attempting to delete set_debug_format.

* clang-format

* Different implementation of FMT_STATICALLY_WIDEN

* Renaming copy_str_range to copy_str.

* I guess I need a definition

* Forgot to delete these.

* Other PR comments.
2022-07-29 13:55:16 -07:00
Jean-Michaël Celerier
258000064d
Add fmt:: namespace to doc (#3009)
Otherwise as-is the example does not compile on Visual Studio due to the conflict with std::format_to: 
https://gcc.godbolt.org/z/qe4jEvvqY
2022-07-29 13:10:09 -07:00
Victor Zverovich
e9ca7ea472 Suppress a bogus warning 2022-07-28 07:12:49 -07:00
Dimitrij Mijoski
81f1cc74a7
Improve Unicode handling when writing to an ostream on Windows (#2994)
* Refactor detail::print() by splitting into two functions.

The part with SetConsoleW is a separate function, without fwrite().

* Make Unicode handing when writing to std::ostream more robust.

Calls to print(ostream&) in the special Unicode case on Windows fallback
to writing via ostream::write instead of fwrite().

* Fix Unicode handling when writing to an ostream on GCC on Windows

* Add TODO note about detail::is_utf8()

* Fix warning -Wundef

* Fix for non-Windows OSs

* Fix building as DLL on Windows

* Refactor

* Suppress warning
2022-07-23 08:03:31 -07:00
Dimitrij Mijoski
bbcb129e02
Reduce filesize of the tests on MinGW (#2995)
This patch removes the workaround applied here
1acfd07f1e.
MinGW is not tested on Appveyor anymore.
2022-07-22 20:11:33 -07:00
Victor Zverovich
48e0a59222 Implement compile-time checks for dynamic width/precision type 2022-07-22 17:00:40 -07:00
Federico
bc5c7c50fd
Fixes IBM XLC behavior with uint128 fallback (#2985)
* Fixes IBM XLC behavior with uint128 fallback

* Replace legacy xlc with clang-based xlc

* simplify xlc intrinsics handling

Co-authored-by: Federico Busato <fbusato@nvidia.com>
2022-07-22 13:49:17 -07:00
Victor Zverovich
00adc7120d Add a regression test for here be dragons 2022-07-22 11:08:00 -07:00
Haowei Hsu
c48be439f1 Add additional search paths for doxygen on Windows
`find_program(DOXYGEN doxygen)` didn't find the executable automatically even if I installed Doxygen on Windows. Therefore, I added some additional search paths.
2022-07-19 08:59:18 -07:00
Victor Zverovich
371f9c71ca Fix even in format_dragon 2022-07-19 08:36:34 -07:00
Victor Zverovich
91abfcd6cf Suppress an msvc warning 2022-07-16 08:57:09 -07:00
Victor Zverovich
deeab54b40 Remove unused include 2022-07-15 20:11:35 -07:00
Junekey Jeon
688a627d6c Remove unused constants. 2022-07-14 15:25:35 -07:00
Junekey Jeon
9bb1605f10 Remove some branches 2022-07-14 15:25:35 -07:00
Junekey Jeon
8061d9afbe Simplify Dragonbox implementation 2022-07-14 15:25:35 -07:00
Victor Zverovich
d82e1a108d Make sure the correct fmod overload is called 2022-07-13 12:42:03 -07:00
Vladislav Shchapov
defa04e730
Fix for EDG frontend (Intel, NVHPC compilers) (#2982)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-07-13 11:34:43 -07:00
Barry Revzin
92d36e82c4
The n specifier for ranges (#2981)
* The n specifier for ranges.

* Flipping flag polarity.
2022-07-12 10:08:38 -07:00
Federico
0db43cf7fe
Pointless comparison warnings (#2971)
Co-authored-by: Federico Busato <fbusato@nvidia.com>
2022-07-11 12:29:39 -07:00
Victor Zverovich
05be7a0764 Use FMT_USE_FLOAT128 instead of __SIZEOF_FLOAT128__ 2022-07-10 08:54:34 -07:00
Victor Zverovich
2a1b3ac629 Fix large shift in uint128_fallback 2022-07-10 08:27:21 -07:00
Daniel Krügler
e1d3d3a326
Exclude recursive ranges from the formatter specialization for ranges (#2974)
* 2954: Add test case

* Eliminate extra-test and merge it into existing std-test instead. Add conditionals for filesystem::path testing that does not run into the ambiguity problem.

* #2968: Introduce additional compile-time predicate to detect recursive ranges and reject them in formatter specialization for ranges. In addition, introduce additional wrapper traits for the individual logical operands of the complete range constraints

* #2968: Eliminate preprocessor condition that enables the formatter specialization for std::filesystem::path

* #2968: Eliminate preprocessor condition that enables the test for the formatter specialization for std::filesystem::path

* Use own bool_constant, which is available for all C++ versions

* Reintroduce previous workaround but restrict to VS 2015 for now

* Comma fix

* - Rename is_not_recursive_range to is_nonrecursive_range and add comment that explains it being depending on is_range being true
- Merge has_fallback_formatter_delayed into is_formattable_delayed and add comment that explains it being depending on is_not_recursive_range being true
- Replace disjunction in formatter specialization by has_fallback_formatter_delayed
- Get rid of unneeded detail:: prefixes within namespace detail
2022-07-10 06:26:23 -07:00
Victor Zverovich
b761f1279e Improve forward using the idea from Jonathan Müller 2022-07-07 16:48:17 -07:00
Victor Zverovich
cc1926942f Inline std::forward 2022-07-07 14:41:54 -07:00
Michael Winterberg
d5e9166f54 Fixed typo in changelog example. 2022-07-05 19:07:39 -07:00
Vladislav Shchapov
b31d1a75a0 Add xchar support for fmt::streamed().
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-07-05 19:07:06 -07:00
Victor Zverovich
c4ee726532 Update version 2022-07-04 09:50:06 -07:00
Victor Zverovich
fa2eb2d2e3 Bump version 2022-07-04 09:37:29 -07:00
Victor Zverovich
35f72bf210 Bump version 2022-07-04 09:10:55 -07:00
Victor Zverovich
d22f00d7e4 Update changelog 2022-07-04 09:01:56 -07:00
Victor Zverovich
4e8d215606 Update changelog 2022-07-04 08:56:18 -07:00
Victor Zverovich
84eecb6561 Prune CI configs 2022-07-04 08:51:35 -07:00