28 lines · cpp
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-exception6//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 all11// appear to provide that behavior too.12 13#include <cstddef>14 15#include "test_macros.h"16 17using PtrdiffT = ::ptrdiff_t;18using SizeT = ::size_t;19#if TEST_STD_VER >= 1120using MaxAlignT = ::max_align_t;21#endif22 23// Supported in C++03 mode too for backwards compatibility with previous versions of libc++24using NullptrT = ::nullptr_t;25 26// Also ensure that we provide std::nullptr_t in C++03 mode, which is an extension too.27using StdNullptrT = std::nullptr_t;28