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>
15 // 1. be in namespace std.
16 // 2. be the same sizeof as void*.
17 // 3. be a signed integral.
21 static_assert(sizeof(std::ptrdiff_t) == sizeof(void*),
22 "sizeof(std::ptrdiff_t) == sizeof(void*)");
23 static_assert(std::is_signed<std::ptrdiff_t>::value,
24 "std::is_signed<std::ptrdiff_t>::value");
25 static_assert(std::is_integral<std::ptrdiff_t>::value,
26 "std::is_integral<std::ptrdiff_t>::value");