Make FMT_USE_CONSTEVAL optional #4545 (#4546)

This commit is contained in:
SnapperTT 2025-09-25 03:30:41 +09:30 committed by GitHub
parent e28c371c0f
commit a2fd48e039
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -114,7 +114,9 @@
#endif
// Detect consteval, C++20 constexpr extensions and std::is_constant_evaluated.
#if !defined(__cpp_lib_is_constant_evaluated)
#ifdef FMT_USE_CONSTEVAL
// Use the provided definition.
#elif !defined(__cpp_lib_is_constant_evaluated)
# define FMT_USE_CONSTEVAL 0
#elif FMT_CPLUSPLUS < 201709L
# define FMT_USE_CONSTEVAL 0