From: Jonathan Wakely Date: Thu, 22 May 2025 11:09:08 +0000 (+0100) Subject: libstdc++: Add always_inline to std::is_constant_evaluated() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2aeeb2803f97bc560ce5e65ab18e6ba7d8fa621;p=thirdparty%2Fgcc.git libstdc++: Add always_inline to std::is_constant_evaluated() We already have the attribute on std::__is_constant_evaluated() but for some reason not on std::is_constant_evaluated(). libstdc++-v3/ChangeLog: * include/std/type_traits (is_constant_evaluated): Add always_inline attribute. --- diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 0601869266c..6bf355d97cc 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -4019,7 +4019,8 @@ template #ifdef __cpp_lib_is_constant_evaluated // C++ >= 20 && HAVE_IS_CONST_EVAL /// Returns true only when called during constant evaluation. /// @since C++20 - constexpr inline bool + [[__gnu__::__always_inline__]] + constexpr bool is_constant_evaluated() noexcept { #if __cpp_if_consteval >= 202106L