]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Use appropriate feature test macro for std::byte
authorJonathan Wakely <jwakely@redhat.com>
Fri, 11 Oct 2024 12:29:06 +0000 (13:29 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 2 Dec 2024 22:41:41 +0000 (22:41 +0000)
libstdc++-v3/ChangeLog:

* include/bits/cpp_type_traits.h (__is_byte<byte>): Guard with
__glibcxx_byte macro instead of checking __cplusplus.

(cherry picked from commit 00a87ee76f47d0fa5a10ef982101cb3c3b8e9c99)

libstdc++-v3/include/bits/cpp_type_traits.h

index 0cb482f54b41ad9e47343a8d5ae40aaaee67a6fa..ffca0e4563c753bde65de76632e60ec8e88d4c70 100644 (file)
@@ -35,6 +35,7 @@
 #pragma GCC system_header
 
 #include <bits/c++config.h>
+#include <bits/version.h>
 
 //
 // 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<>