]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove std::byte overloads from <bit>
authorJonathan Wakely <jwakely@redhat.com>
Fri, 26 Jul 2019 13:36:44 +0000 (14:36 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 26 Jul 2019 13:36:44 +0000 (14:36 +0100)
The additional overloads for std::byte in <bit> were reviewed by LEWG
and considered undesirable, so this patch removes them.

Backport from mainline (partial)
2019-06-26  Jonathan Wakely  <jwakely@redhat.com>

* include/std/bit (rotl(byte, unsigned), rotr(byte, unsigned))
(countl_zero(byte), countl_one(byte), countr_zero(byte))
(countr_one(byte), popcount(byte), ispow2(byte), ceil2(byte))
(floor2(byte), log2p1(byte)): Remove.
* testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
std::byte overload.
* testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
* testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
* testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.

From-SVN: r273834

13 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/bit
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/ceil2.cc
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/floor2.cc
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/ispow2.cc
libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/log2p1.cc
libstdc++-v3/testsuite/26_numerics/bit/bitops.count/countl_one.cc
libstdc++-v3/testsuite/26_numerics/bit/bitops.count/countl_zero.cc
libstdc++-v3/testsuite/26_numerics/bit/bitops.count/countr_one.cc
libstdc++-v3/testsuite/26_numerics/bit/bitops.count/countr_zero.cc
libstdc++-v3/testsuite/26_numerics/bit/bitops.count/popcount.cc
libstdc++-v3/testsuite/26_numerics/bit/bitops.rot/rotl.cc
libstdc++-v3/testsuite/26_numerics/bit/bitops.rot/rotr.cc

index e68a43ccc6c4eed0dba0c7657b6c2ef6ae000d3a..d688eb8f9f9b0f59d371102afbec296125f2d7a7 100644 (file)
@@ -1,3 +1,25 @@
+2019-07-26  Jonathan Wakely  <jwakely@redhat.com>
+
+       Backport from mainline (partial)
+       2019-06-26  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/std/bit (rotl(byte, unsigned), rotr(byte, unsigned))
+       (countl_zero(byte), countl_one(byte), countr_zero(byte))
+       (countr_one(byte), popcount(byte), ispow2(byte), ceil2(byte))
+       (floor2(byte), log2p1(byte)): Remove.
+       * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
+       std::byte overload.
+       * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
+       * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
+       * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
+       * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
+       * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
+       * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
+       * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
+       * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
+       * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
+       * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
+       
 2019-07-26  Jonathan Wakely  <jwakely@redhat.com>
 
        Backport from mainline
index e0c53e53756384d0333ef819c8b1e60e0f36329e..07eb868c8311dc758be48be3b7d4c293f7c31ab7 100644 (file)
@@ -299,54 +299,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     log2p1(_Tp __x) noexcept
     { return std::__log2p1(__x); }
 
-#if ! __STRICT_ANSI__
-  enum class byte : unsigned char;
-
-  constexpr byte
-  rotl(byte __x, unsigned int __s) noexcept
-  { return (byte)std::__rotl((unsigned char)__x, __s); }
-
-  constexpr byte
-  rotr(byte __x, unsigned int __s) noexcept
-  { return (byte)std::__rotr((unsigned char)__x, __s); }
-
-  constexpr int
-  countl_zero(byte __x) noexcept
-  { return std::__countl_zero((unsigned char)__x); }
-
-  constexpr int
-  countl_one(byte __x) noexcept
-  { return std::__countl_one((unsigned char)__x); }
-
-  constexpr int
-  countr_zero(byte __x) noexcept
-  { return std::__countr_zero((unsigned char)__x); }
-
-  constexpr int
-  countr_one(byte __x) noexcept
-  { return std::__countr_one((unsigned char)__x); }
-
-  constexpr int
-  popcount(byte __x) noexcept
-  { return std::__popcount((unsigned char)__x); }
-
-  constexpr bool
-  ispow2(byte __x) noexcept
-  { return std::__ispow2((unsigned char)__x); }
-
-  constexpr byte
-  ceil2(byte __x) noexcept
-  { return (byte)std::__ceil2((unsigned char)__x); }
-
-  constexpr byte
-  floor2(byte __x) noexcept
-  { return (byte)std::__floor2((unsigned char)__x); }
-
-  constexpr byte
-  log2p1(byte __x) noexcept
-  { return (byte)std::__log2p1((unsigned char)__x); }
-#endif
-
 #endif // C++2a
 
 _GLIBCXX_END_NAMESPACE_VERSION
index 6ffb5f70edb9bea666447e3ff0997eac18411bc4..84f3ac156c3f02be80c4ebf8690cc18dfa8b3fab 100644 (file)
@@ -86,18 +86,6 @@ static_assert( test( X{} ).did_not_match() );
 enum E : unsigned { e };
 static_assert( test( e ).did_not_match() );
 
-#ifndef __STRICT_ANSI__
-#include <cstddef>
-static_assert( std::ceil2(std::byte{0}) == std::byte{1} );
-static_assert( std::ceil2(std::byte{1}) == std::byte{1} );
-static_assert( std::ceil2(std::byte{2}) == std::byte{2} );
-static_assert( std::ceil2(std::byte{3}) == std::byte{4} );
-static_assert( std::ceil2(std::byte{100}) == std::byte{128} );
-static_assert( std::ceil2(std::byte{128}) == std::byte{128} );
-#else
-static_assert( test( (std::byte)0 ).did_not_match() );
-#endif
-
 #if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128
 static_assert( test( (unsigned __int128)0 ) );
 static_assert( test( (__int128)0 ).did_not_match() );
@@ -114,3 +102,10 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() );
 static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) );
 static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() );
 #endif
+#if defined(__GLIBCXX_TYPE_INT_N_3)
+static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_3)0 ) );
+static_assert( test( (__GLIBCXX_TYPE_INT_N_3)0 ).did_not_match() );
+#endif
+
+#include <cstddef>
+static_assert( test( (std::byte)0 ).did_not_match() );
index a18f14ff98897a15803975bc178d6dcfb97900a9..aff9138650eb92bb577896f0f74a85747ed98ed5 100644 (file)
@@ -78,19 +78,6 @@ static_assert( test( X{} ).did_not_match() );
 enum E : unsigned { e };
 static_assert( test( e ).did_not_match() );
 
-#ifndef __STRICT_ANSI__
-#include <cstddef>
-static_assert( std::floor2(std::byte{0}) == std::byte{0} );
-static_assert( std::floor2(std::byte{1}) == std::byte{1} );
-static_assert( std::floor2(std::byte{2}) == std::byte{2} );
-static_assert( std::floor2(std::byte{3}) == std::byte{2} );
-static_assert( std::floor2(std::byte{100}) == std::byte{64} );
-static_assert( std::floor2(std::byte{128}) == std::byte{128} );
-static_assert( std::floor2(std::byte{255}) == std::byte{128} );
-#else
-static_assert( test( (std::byte)0 ).did_not_match() );
-#endif
-
 #if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128
 static_assert( test( (unsigned __int128)0 ) );
 static_assert( test( (__int128)0 ).did_not_match() );
@@ -107,3 +94,6 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() );
 static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) );
 static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() );
 #endif
+
+#include <cstddef>
+static_assert( test( (std::byte)0 ).did_not_match() );
index 8ab8b7175040e131751a5237edf0a4039240227d..869197627d4ebda0ddf15943612f9354a3b2fd32 100644 (file)
@@ -126,19 +126,6 @@ static_assert( test( X{} ).did_not_match() );
 enum E : unsigned { e };
 static_assert( test( e ).did_not_match() );
 
-#ifndef __STRICT_ANSI__
-#include <cstddef>
-static_assert( std::ispow2(std::byte{0}) == false );
-static_assert( std::ispow2(std::byte{1}) == true );
-static_assert( std::ispow2(std::byte{2}) == true );
-static_assert( std::ispow2(std::byte{3}) == false );
-static_assert( std::ispow2(std::byte{100}) == false );
-static_assert( std::ispow2(std::byte{128}) == true );
-static_assert( std::ispow2(std::byte{255}) == false );
-#else
-static_assert( test( (std::byte)0 ).did_not_match() );
-#endif
-
 #if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128
 static_assert( test( (unsigned __int128)0 ) );
 static_assert( test( (__int128)0 ).did_not_match() );
@@ -155,3 +142,6 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() );
 static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) );
 static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() );
 #endif
+
+#include <cstddef>
+static_assert( test( (std::byte)0 ).did_not_match() );
index 0aa8a6c40f6183143fa1f913be638b52c5b3894f..aeb5486b90921833198f831b0d0b2ee1310167df 100644 (file)
@@ -78,19 +78,6 @@ static_assert( test( X{} ).did_not_match() );
 enum E : unsigned { e };
 static_assert( test( e ).did_not_match() );
 
-#ifndef __STRICT_ANSI__
-#include <cstddef>
-static_assert( std::log2p1(std::byte{0}) == std::byte{0} );
-static_assert( std::log2p1(std::byte{1}) == std::byte{1} );
-static_assert( std::log2p1(std::byte{2}) == std::byte{2} );
-static_assert( std::log2p1(std::byte{3}) == std::byte{2} );
-static_assert( std::log2p1(std::byte{100}) == std::byte{7} );
-static_assert( std::log2p1(std::byte{128}) == std::byte{8} );
-static_assert( std::log2p1(std::byte{255}) == std::byte{8} );
-#else
-static_assert( test( (std::byte)0 ).did_not_match() );
-#endif
-
 #if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128
 static_assert( test( (unsigned __int128)0 ) );
 static_assert( test( (__int128)0 ).did_not_match() );
@@ -107,3 +94,6 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() );
 static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) );
 static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() );
 #endif
+
+#include <cstddef>
+static_assert( test( (std::byte)0 ).did_not_match() );
index 6fc634d55b588df8414c900d36de116a98a55cff..50b681c00900f5e7a9d0e62b94b3b0864219456b 100644 (file)
@@ -73,16 +73,6 @@ static_assert( test( X{} ).did_not_match() );
 enum E : unsigned { e };
 static_assert( test( e ).did_not_match() );
 
-#ifndef __STRICT_ANSI__
-#include <cstddef>
-constexpr int bits = std::numeric_limits<unsigned char>::digits;
-static_assert( std::countl_one(std::byte{0}) == 0 );
-static_assert( std::countl_one(~std::byte{0}) == bits );
-static_assert( std::countl_one(~std::byte{0} ^ std::byte{7}) == bits - 3 );
-#else
-static_assert( test( (std::byte)0 ).did_not_match() );
-#endif
-
 #if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128
 static_assert( test( (unsigned __int128)0 ) );
 static_assert( test( (__int128)0 ).did_not_match() );
@@ -99,3 +89,6 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() );
 static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) );
 static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() );
 #endif
+
+#include <cstddef>
+static_assert( test( (std::byte)0 ).did_not_match() );
index 64049a32e0e4f7deac8a9a582497529059e19059..8c8a13fed34e02bcbc45828e6f2345175def674f 100644 (file)
@@ -70,20 +70,6 @@ static_assert( test( X{} ).did_not_match() );
 enum E : unsigned { e };
 static_assert( test( e ).did_not_match() );
 
-#ifndef __STRICT_ANSI__
-#include <cstddef>
-constexpr int bits = std::numeric_limits<unsigned char>::digits;
-static_assert( std::countl_zero(std::byte{0}) == bits );
-static_assert( std::countl_zero(std::byte{0x01}) == bits - 1 );
-static_assert( std::countl_zero(std::byte{0x02}) == bits - 2 );
-static_assert( std::countl_zero(std::byte{0x03}) == bits - 2 );
-static_assert( std::countl_zero(std::byte{0x30}) == 2 );
-static_assert( std::countl_zero(std::byte{0x40}) == 1 );
-static_assert( std::countl_zero(std::byte{0x41}) == 1 );
-#else
-static_assert( test( (std::byte)0 ).did_not_match() );
-#endif
-
 #if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128
 static_assert( test( (unsigned __int128)0 ) );
 static_assert( test( (__int128)0 ).did_not_match() );
@@ -100,3 +86,6 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() );
 static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) );
 static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() );
 #endif
+
+#include <cstddef>
+static_assert( test( (std::byte)0 ).did_not_match() );
index 3218ef7b52d95806c2152e2ba877b7fd0c784650..16c98579316ec4248d0b5434eac68b826e8a1239 100644 (file)
@@ -72,20 +72,6 @@ static_assert( test( X{} ).did_not_match() );
 enum E : unsigned { e };
 static_assert( test( e ).did_not_match() );
 
-#ifndef __STRICT_ANSI__
-#include <cstddef>
-constexpr int bits = std::numeric_limits<unsigned char>::digits;
-static_assert( std::countr_one(std::byte{0}) == 0 );
-static_assert( std::countr_one(std::byte{0x01}) == 1 );
-static_assert( std::countr_one(std::byte{0x02}) == 0 );
-static_assert( std::countr_one(std::byte{0x03}) == 2 );
-static_assert( std::countr_one(std::byte{0x30}) == 0 );
-static_assert( std::countr_one(std::byte{0x0f}) == 4 );
-static_assert( std::countr_one(std::byte{0xff}) == 8 );
-#else
-static_assert( test( (std::byte)0 ).did_not_match() );
-#endif
-
 #if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128
 static_assert( test( (unsigned __int128)0 ) );
 static_assert( test( (__int128)0 ).did_not_match() );
@@ -102,3 +88,6 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() );
 static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) );
 static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() );
 #endif
+
+#include <cstddef>
+static_assert( test( (std::byte)0 ).did_not_match() );
index 2f8505cb1fd1caa42a84bdd506c965bba35710bd..0e1970b2af6903f6f92eb6ae90899bb8e598373b 100644 (file)
@@ -71,20 +71,6 @@ static_assert( test( X{} ).did_not_match() );
 enum E : unsigned { e };
 static_assert( test( e ).did_not_match() );
 
-#ifndef __STRICT_ANSI__
-#include <cstddef>
-constexpr int bits = std::numeric_limits<unsigned char>::digits;
-static_assert( std::countr_zero(std::byte{0}) == bits );
-static_assert( std::countr_zero(std::byte{0x01}) == 0 );
-static_assert( std::countr_zero(std::byte{0x02}) == 1 );
-static_assert( std::countr_zero(std::byte{0x03}) == 0 );
-static_assert( std::countr_zero(std::byte{0x30}) == 4 );
-static_assert( std::countr_zero(std::byte{0x40}) == 6 );
-static_assert( std::countr_zero(std::byte{0x41}) == 0 );
-#else
-static_assert( test( (std::byte)0 ).did_not_match() );
-#endif
-
 #if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128
 static_assert( test( (unsigned __int128)0 ) );
 static_assert( test( (__int128)0 ).did_not_match() );
@@ -101,3 +87,6 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() );
 static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) );
 static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() );
 #endif
+
+#include <cstddef>
+static_assert( test( (std::byte)0 ).did_not_match() );
index aea16214beab6bc3adf9ea80b7dae0c41f044860..07b8c6ac4e254956410c856577542c51150a90d9 100644 (file)
@@ -74,20 +74,6 @@ static_assert( test( X{} ).did_not_match() );
 enum E : unsigned { e };
 static_assert( test( e ).did_not_match() );
 
-#ifndef __STRICT_ANSI__
-#include <cstddef>
-static_assert( std::popcount(std::byte{0x00}) == 0 );
-static_assert( std::popcount(std::byte{0x01}) == 1 );
-static_assert( std::popcount(std::byte{0x02}) == 1 );
-static_assert( std::popcount(std::byte{0x03}) == 2 );
-static_assert( std::popcount(std::byte{0x30}) == 2 );
-static_assert( std::popcount(std::byte{0x40}) == 1 );
-static_assert( std::popcount(std::byte{0x41}) == 2 );
-static_assert( std::popcount(std::byte{0xff}) == 8 );
-#else
-static_assert( test( (std::byte)0 ).did_not_match() );
-#endif
-
 #if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128
 static_assert( test( (unsigned __int128)0 ) );
 static_assert( test( (__int128)0 ).did_not_match() );
@@ -104,3 +90,6 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() );
 static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) );
 static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() );
 #endif
+
+#include <cstddef>
+static_assert( test( (std::byte)0 ).did_not_match() );
index 94be65c3d138389db2cf7955c12667687e5b1419..2d97ae8c46574a85ad3af8e0527fd74ab4d19570 100644 (file)
@@ -86,19 +86,6 @@ static_assert( test( X{} ).did_not_match() );
 enum E : unsigned { e };
 static_assert( test( e ).did_not_match() );
 
-#ifndef __STRICT_ANSI__
-#include <cstddef>
-static_assert( std::rotl(std::byte{0}, 4) == std::byte{0} );
-static_assert( std::rotl(std::byte{0x01}, 4) == std::byte{0x10} );
-static_assert( std::rotl(std::byte{0x02}, 3) == std::byte{0x10} );
-static_assert( std::rotl(std::byte{0x03}, 2) == std::byte{0x0c} );
-static_assert( std::rotl(std::byte{0x30}, 2) == std::byte{0xc0} );
-static_assert( std::rotl(std::byte{0x40}, 1) == std::byte{0x80} );
-static_assert( std::rotl(std::byte{0x41}, 9) == std::byte{0x82} );
-#else
-static_assert( test( (std::byte)0 ).did_not_match() );
-#endif
-
 #if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128
 static_assert( test( (unsigned __int128)0 ) );
 static_assert( test( (__int128)0 ).did_not_match() );
@@ -115,3 +102,6 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() );
 static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) );
 static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() );
 #endif
+
+#include <cstddef>
+static_assert( test( (std::byte)0 ).did_not_match() );
index 3f1539aadbb3dc089f2dd44c17e5e12ae8b0f058..c41c24d816a54d577a2f98a359c3990cf21e977e 100644 (file)
@@ -88,19 +88,6 @@ static_assert( test( X{} ).did_not_match() );
 enum E : unsigned { e };
 static_assert( test( e ).did_not_match() );
 
-#ifndef __STRICT_ANSI__
-#include <cstddef>
-static_assert( std::rotr(std::byte{0}, 4) == std::byte{0} );
-static_assert( std::rotr(std::byte{0x01}, 4) == std::byte{0x10} );
-static_assert( std::rotr(std::byte{0x02}, 3) == std::byte{0x40} );
-static_assert( std::rotr(std::byte{0x03}, 2) == std::byte{0xc0} );
-static_assert( std::rotr(std::byte{0x30}, 2) == std::byte{0x0c} );
-static_assert( std::rotr(std::byte{0x40}, 1) == std::byte{0x20} );
-static_assert( std::rotr(std::byte{0x41}, 9) == std::byte{0xa0} );
-#else
-static_assert( test( (std::byte)0 ).did_not_match() );
-#endif
-
 #if !defined(__STRICT_ANSI__) && defined _GLIBCXX_USE_INT128
 static_assert( test( (unsigned __int128)0 ) );
 static_assert( test( (__int128)0 ).did_not_match() );
@@ -117,3 +104,6 @@ static_assert( test( (__GLIBCXX_TYPE_INT_N_1)0 ).did_not_match() );
 static_assert( test( (unsigned __GLIBCXX_TYPE_INT_N_2)0 ) );
 static_assert( test( (__GLIBCXX_TYPE_INT_N_2)0 ).did_not_match() );
 #endif
+
+#include <cstddef>
+static_assert( test( (std::byte)0 ).did_not_match() );