| 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 | |
| 15 | #include "test_macros.h" |
| 16 | |
| 17 | using PtrdiffT = ::ptrdiff_t; |
| 18 | using SizeT = ::size_t; |
| 19 | #if TEST_STD_VER >= 11 |
| 20 | using MaxAlignT = ::max_align_t; |
| 21 | #endif |
| 22 | |
| 23 | // Supported in C++03 mode too for backwards compatibility with previous versions of libc++ |
| 24 | using NullptrT = ::nullptr_t; |
| 25 | |
| 26 | // Also ensure that we provide std::nullptr_t in C++03 mode, which is an extension too. |
| 27 | using StdNullptrT = std::nullptr_t; |
| 28 | |