-
Notifications
You must be signed in to change notification settings - Fork 106
feat: Bump to C++20 and update TPLs #4127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 12 commits
0fc3101
7779fbb
e2801cc
6ba520f
803697c
2f69e1a
5e3217f
c52032a
afb2a7d
9116976
1b8c5f2
11758cb
d0e0dea
8723e09
3d8fea4
de5fa81
dd7364c
03fb8eb
4d14733
c22779b
6dbd49f
63445db
1f12dc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| +7 −5 | src/input.hpp | |
| +8 −8 | unitTests/testMemcpy.cpp | |
| +2 −2 | unitTests/testTensorOpsEigen.cpp |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,9 +19,7 @@ | |
| #include <type_traits> | ||
| #include <optional> | ||
|
|
||
| #if __cplusplus < 202002L | ||
| #define GEOS_USE_FMT | ||
| #endif | ||
|
|
||
| #ifdef GEOS_USE_FMT | ||
| #ifndef FMT_HEADER_ONLY | ||
|
|
@@ -33,9 +31,6 @@ | |
| #include "../include/fmt/ranges.h" | ||
| #include "../include/fmt/xchar.h" | ||
| #define GEOS_FMT_NS fmt | ||
| #else // use C++20's <format> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit confused here. Since we are not enforcing C++20, shouldn't we always use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi Dick, this branch is enforcing C++20, but |
||
| #include <format> | ||
| #define GEOS_FMT_NS std | ||
| #endif | ||
|
|
||
| #ifdef GEOS_USE_FMT | ||
|
|
@@ -80,6 +75,12 @@ struct fmt::formatter< T, std::enable_if_t< std::is_enum< T >::value > > | |
| */ | ||
| #define GEOS_FMT( msg, ... ) GEOS_FMT_NS::format( msg, __VA_ARGS__ ) | ||
|
|
||
| /** | ||
| * @brief Interpolate arguments into a run-time format string. | ||
| * @param msg the message format string, evaluated at run time | ||
| */ | ||
| #define GEOS_FMT_RUNTIME( msg, ... ) GEOS_FMT_NS::format( GEOS_FMT_NS::runtime( msg ), __VA_ARGS__ ) | ||
|
|
||
| /** | ||
| * @brief Interpolate arguments into a message format string and write into an output iterator. | ||
| * @param iter the output iterator to write to | ||
|
|
@@ -140,18 +141,8 @@ constexpr auto GEOS_FMT_NS::detail::has_const_formatter_impl< GEOS_FMT_NS::forma | |
| /** | ||
| * Evaluates at compile time if a fmt::formatter exists for a given type | ||
| */ | ||
| #if __cplusplus < 202002L | ||
| // fmt 11.2: has_formatter<T, Context>() no longer works. The second parameter | ||
| // is now Char (not format_context), and the type-trait form is deprecated. | ||
| template< class T > | ||
| static constexpr bool has_formatter_v = fmt::is_formattable< fmt::remove_cvref_t< T > >::value; | ||
| #else | ||
| template< typename T > | ||
| concept has_formatter_v = requires ( T& v, std::format_context ctx ) | ||
| { | ||
| std::formatter< std::remove_cvref_t< T > >().format( v, ctx ); | ||
| }; | ||
| #endif | ||
|
|
||
| namespace geos::format | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.