Fix C++20 concept detection (#4653)

This commit is contained in:
Yat Ho
2026-01-17 02:48:40 +08:00
committed by GitHub
parent 0e078f6ed0
commit a9ea225cad

View File

@@ -2803,7 +2803,7 @@ template <typename T, typename Char = char>
using is_formattable = bool_constant<!std::is_same<
detail::mapped_t<conditional_t<std::is_void<T>::value, int*, T>, Char>,
void>::value>;
#ifdef __cpp_concepts
#if defined(__cpp_concepts) && __cpp_concepts >= 201907L
template <typename T, typename Char = char>
concept formattable = is_formattable<remove_reference_t<T>, Char>::value;
#endif