From: Jonathan Wakely Date: Fri, 11 Oct 2024 12:29:06 +0000 (+0100) Subject: libstdc++: Use appropriate feature test macro for std::byte X-Git-Tag: releases/gcc-14.3.0~763 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4c402b5177c51f3e7292da776dcf44a63d05196;p=thirdparty%2Fgcc.git libstdc++: Use appropriate feature test macro for std::byte libstdc++-v3/ChangeLog: * include/bits/cpp_type_traits.h (__is_byte): Guard with __glibcxx_byte macro instead of checking __cplusplus. (cherry picked from commit 00a87ee76f47d0fa5a10ef982101cb3c3b8e9c99) --- diff --git a/libstdc++-v3/include/bits/cpp_type_traits.h b/libstdc++-v3/include/bits/cpp_type_traits.h index 0cb482f54b41..ffca0e4563c7 100644 --- a/libstdc++-v3/include/bits/cpp_type_traits.h +++ b/libstdc++-v3/include/bits/cpp_type_traits.h @@ -35,6 +35,7 @@ #pragma GCC system_header #include +#include // // This file provides some compile-time information about various types. @@ -447,7 +448,7 @@ __INT_N(__GLIBCXX_TYPE_INT_N_3) typedef __true_type __type; }; -#if __cplusplus >= 201703L +#ifdef __glibcxx_byte // C++ >= 17 enum class byte : unsigned char; template<>