1//===----------------------------------------------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include <cstddef>
11#include <type_traits>
12
13// size_t should:
14
15//  1. be in namespace std.
16//  2. be the same sizeof as void*.
17//  3. be an unsigned integral.
18
19int main()
20{
21    static_assert(sizeof(std::size_t) == sizeof(void*),
22                  "sizeof(std::size_t) == sizeof(void*)");
23    static_assert(std::is_unsigned<std::size_t>::value,
24                  "std::is_unsigned<std::size_t>::value");
25    static_assert(std::is_integral<std::size_t>::value,
26                  "std::is_integral<std::size_t>::value");
27}
28