1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // Make sure libc++'s <cstddef> defines types like ::nullptr_t in the global namespace.
10 // This is a conforming extension to be consistent with other implementations, which all
11 // appear to provide that behavior too.
12 
13 #include <cstddef>
14 #include "test_macros.h"
15 
16 using PtrdiffT = ::ptrdiff_t;
17 using SizeT = ::size_t;
18 #if TEST_STD_VER >= 11
19 using MaxAlignT = ::max_align_t;
20 #endif
21 
22 // Supported in C++03 mode too for backwards compatibility with previous versions of libc++
23 using NullptrT = ::nullptr_t;
24 
25 // Also ensure that we provide std::nullptr_t in C++03 mode, which is an extension too.
26 using StdNullptrT = std::nullptr_t;
27