1// -*- C++ -*- 2//===----------------------------------------------------------------------===// 3// 4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5// See https://llvm.org/LICENSE.txt for license information. 6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef _LIBCPP_CSTDALIGN 11#define _LIBCPP_CSTDALIGN 12 13/* 14 cstdalign synopsis 15 16Macros: 17 18 __alignas_is_defined 19 __alignof_is_defined 20 21*/ 22 23#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) 24# include <__cxx03/__config> 25#else 26# include <__config> 27 28// <stdalign.h> is not provided by libc++ 29# if __has_include(<stdalign.h>) 30# include <stdalign.h> 31# ifdef _LIBCPP_STDALIGN_H 32# error "If libc++ starts defining <stdalign.h>, the __has_include check should move to libc++'s <stdalign.h>" 33# endif 34# endif 35 36# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 37# pragma GCC system_header 38# endif 39 40# undef __alignas_is_defined 41# define __alignas_is_defined 1 42 43# undef __alignof_is_defined 44# define __alignof_is_defined 1 45 46# if _LIBCPP_STD_VER >= 20 47 48using __standard_header_cstdalign _LIBCPP_DEPRECATED_("removed in C++20.") _LIBCPP_NODEBUG = void; 49using __use_standard_header_cstdalign _LIBCPP_NODEBUG = __standard_header_cstdalign; 50 51# elif _LIBCPP_STD_VER >= 17 52 53using __standard_header_cstdalign _LIBCPP_DEPRECATED _LIBCPP_NODEBUG = void; 54using __use_standard_header_cstdalign _LIBCPP_NODEBUG = __standard_header_cstdalign; 55 56# endif 57#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) 58 59#endif // _LIBCPP_CSTDALIGN 60