1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 #include <type_traits>
12 #include <test_macros.h>
14 // XFAIL: c++98, c++03, c++11, c++14
16 // std::byte is not an integer type, nor a character type.
17 // It is a distinct type for accessing the bits that ultimately make up object storage.
19 static_assert( std::is_pod<std::byte>::value, "" );
20 static_assert(!std::is_arithmetic<std::byte>::value, "" );
21 static_assert(!std::is_integral<std::byte>::value, "" );
23 static_assert(!std::is_same<std::byte, char>::value, "" );
24 static_assert(!std::is_same<std::byte, signed char>::value, "" );
25 static_assert(!std::is_same<std::byte, unsigned char>::value, "" );
27 // The standard doesn't outright say this, but it's pretty clear that it has to be true.
28 static_assert(sizeof(std::byte) == 1, "" );