From 40501ffbb441ce48733b3733b7ab781c7db8cca8 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 20 Dec 2024 21:53:34 +0100 Subject: [PATCH] q23type_traits.h: use is_scoped_enum_v from std We don't like surprises in qNN, so use the real is_scoped_enum_v from std instead of adding the _v version outselves, even in C++20. Amends 03a7be37806a32e9a8ac963b309812d6b8f125f6 and 63a8f657c2236829f16016602d9c0098b089d35e. Pick-to: 6.9 Change-Id: I7f9149678b95f7a59643152abf5a627e226cc058 Reviewed-by: Thiago Macieira --- src/corelib/global/q23type_traits.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/q23type_traits.h b/src/corelib/global/q23type_traits.h index 7eb2f8ca71e..7cf05729ed4 100644 --- a/src/corelib/global/q23type_traits.h +++ b/src/corelib/global/q23type_traits.h @@ -27,6 +27,7 @@ namespace q23 { // like std::is_scoped_enum #ifdef __cpp_lib_is_scoped_enum using std::is_scoped_enum; +using std::is_scoped_enum_v; #else template > @@ -36,10 +37,10 @@ struct is_scoped_enum : std::negation struct is_scoped_enum : std::false_type {}; -#endif // __cpp_lib_is_scoped_enum template inline constexpr bool is_scoped_enum_v = is_scoped_enum::value; +#endif // __cpp_lib_is_scoped_enum } QT_END_NAMESPACE