StepSecurity Bot
b8f81dede5
[StepSecurity] ci: Harden GitHub Actions ( #3759 )
...
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2023-12-17 17:01:17 -08:00
Vladislav Shchapov
923005bd4f
Add stdlib version check for C++20 ( #3754 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2023-12-17 08:33:17 -08:00
Victor Zverovich
afa85e46c3
Apply clang-format
2023-12-17 07:32:22 -08:00
js324
6025bd7c37
Add localized formatting to non-decimal presentation types of ints ( #3750 )
2023-12-15 07:51:25 -08:00
Victor Zverovich
5471a2426c
Update README.md
2023-12-13 09:32:00 -08:00
Kefu Chai
7d757cba5d
CI: add lint github workflow for running clang-format ( #3749 )
...
so that we can identify changes which do not confirm to the
clang-format rules.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2023-12-13 07:20:23 -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
Victor Zverovich
bbee753579
Make clang-format happy
2023-12-13 06:54:51 -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
Kefu Chai
274ba2645b
allow format_as() to format reference ( #3739 )
...
before this change, format_as() is unable to format a type which
has `auto format_as() -> const another_type&`, and `another_type`
is formattable. because `format_as_result` maps the result type
as it is, and the compiler refuses to compile
`static_cast<T*>(nullptr)`, where T is a reference type. but
it would be handy if we could use `format_as()` to format types
which, for instance, owns / inherit from a formattable type, and
delegate the formatter to these variables instead without creating
a copy of them.
in this change:
* instruct `format_as_result` to map the
result type to the decayed type, so that `type` can be the decayed
type of result type, and this also enables `type` to be formattable,
as long as the decayed type is formattable.
* corresponding test is added to format-test.cc
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2023-12-10 08:49:53 -08:00
Victor Zverovich
9048add999
Report out-of-range errors in chrono
2023-12-10 08:28:50 -08:00
Victor Zverovich
640e0c02d4
Update README.md
2023-12-09 17:37:07 -08:00
Vladislav Shchapov
6392dba21c
Fix warning: identifier '_a' preceded by whitespace in a literal operator declaration is deprecated ( #3748 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2023-12-09 08:16:57 -08:00
Ikko Eltociear Ashimine
9a6fd11a56
Fix typo in gmock-gtest-all.cc ( #3747 )
...
syntetic -> synthetic
2023-12-09 08:13:20 -08:00
Victor Zverovich
dee0dbf07f
Update README.md
2023-12-08 14:24:11 -08:00
George Liontos
2fabb43b93
Fix README file table ( #3744 )
...
Co-authored-by: George Liontos <george.liontos@forallsecure.com>
2023-12-08 10:26:52 -08:00
Albert Santoni
9c3c107c8c
Fix compile with GCC 6.3.0 (bug #3738 ) ( #3743 )
2023-12-08 09:36:33 -08:00
H1X4
4497a2d09a
fix cmake build
2023-12-08 08:33:16 -08:00
Victor Zverovich
81629e425c
Convert README to Markdown
2023-12-08 07:28:33 -08:00
reinhardt1053
6f95000b7a
Update README.rst ( #3737 )
...
Fix Celestia URL
2023-12-07 06:21:06 -08:00
js324
573d74395b
error on bool arg w/ char pres_type ( #3734 )
2023-12-05 13:45:10 -08:00
Victor Zverovich
5d55375a8a
Experiment with scan buffering
2023-12-03 08:09:36 -08:00
Ivan Shapovalov
71bd51e6c2
Implement %j
specifier for std::chrono::duration
( #3732 )
...
This adds support for `%j` presentation type for duration types:
> "If the type being formatted is a specialization of duration, the decimal
number of days without padding."
Fixes #3643 .
2023-12-03 07:29:58 -08:00
Victor Zverovich
f575089243
Simplify test
2023-12-01 08:52:42 -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
Victor Zverovich
5cfd28d476
Experiment with FILE in scan
2023-11-26 10:01:42 -08:00
Victor Zverovich
73fae91e64
Cleanup .gitignore
2023-11-25 09:45:38 -08:00
Victor Zverovich
6988be3878
Bump version
2023-11-25 09:11:53 -08:00
Victor Zverovich
2d1e4bb35e
Remove a useless comment
2023-11-25 09:05:20 -08:00
Corentin Schreiber
7f8d419115
Fix overflow in time_point formatting with large dates ( #3727 )
...
* Fix #3725 and rename fmt_safe_duration_cast to fmt_duration_cast
The function is now more generic and will handle all casts. It also
takes care of toggling safe vs unsafe casts using
FMT_SAFE_DURATION_CAST.
* Refactor fmt_duration_cast to put #ifdef inside the function
* Fix compilation error with FMT_USE_LOCAL_TIME
2023-11-25 08:36:55 -08:00
Victor Zverovich
ccc9ab7bf9
Include correct header
2023-11-25 08:23:41 -08:00
Victor Zverovich
c4283ec471
Fix a libc++ warning and move the test to the right place
2023-11-25 08:20:53 -08:00
Victor Zverovich
c3f9a73445
Apply coding conventions
2023-11-25 07:43:44 -08:00
Victor Zverovich
06f1c0d725
Clarify that calling non-const format is deprecated
2023-11-24 10:21:57 -08:00
Victor Zverovich
ffa5b14fe3
Make gtest-extra-test more portable
2023-11-24 10:09:21 -08:00
Victor Zverovich
bea7ecc710
Disable locale-specific tests on OpenBSD
2023-11-24 09:45:56 -08:00
Victor Zverovich
8a39388516
Fix the default locale in ostream_formatter
2023-11-24 09:24:43 -08:00
Peter Johnson
dd6f657a79
Remove this-> from decltype ( #3723 )
...
* Remove this-> from decltype
The latest version of MSVC doesn't like it, and removing it doesn't seem to harm anything.
* Add ifdef for GCC < 5
2023-11-22 09:46:04 -08:00
Victor Zverovich
c13753a70c
Fix handling of invalid Unicode in precision
2023-11-18 08:36:11 -10:00
Ole Bøe
864a8b5f38
fix: support optional<T> with format_as(T) ( #3713 )
...
Formatting a std::optional<T> where T had a custom format_as(T) function failed to compile with clang,
due to set_debug_format being hidden by private inheritance. This fix makes the function available through a using clause.
2023-11-16 15:02:33 -08:00
Victor Zverovich
649fe0fc8b
Fix handling of null strings with the s specifier
2023-11-15 17:03:01 -10: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
045b05d79e
Revert CMake changes
2023-11-14 06:48:16 -10:00
Victor Zverovich
ec628561c2
Fix formatting
2023-11-13 06:41:28 -10:00
Luis Caro Campos
cbb18c237a
Add support for CMake 3.28 C++ modules ( #3679 )
2023-11-13 08:34:42 -08:00
Victor Zverovich
6b0082e6c7
Improve OpenBSD workaround
2023-11-07 09:24:33 -10:00