Revert "[libc] Use best-fit binary trie to make malloc logarithmic" (#117065)
[llvm-project.git] / libcxx / include / cstdalign
blobe6a2a3c717742204045f20b257173ff8558925f1
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 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP_CSTDALIGN
11 #define _LIBCPP_CSTDALIGN
14     cstdalign synopsis
16 Macros:
18     __alignas_is_defined
19     __alignof_is_defined
23 #include <__config>
25 // <stdalign.h> is not provided by libc++
26 #if __has_include(<stdalign.h>)
27 #  include <stdalign.h>
28 #  ifdef _LIBCPP_STDALIGN_H
29 #    error "If libc++ starts defining <stdalign.h>, the __has_include check should move to libc++'s <stdalign.h>"
30 #  endif
31 #endif
33 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
34 #  pragma GCC system_header
35 #endif
37 #undef __alignas_is_defined
38 #define __alignas_is_defined 1
40 #undef __alignof_is_defined
41 #define __alignof_is_defined 1
43 #if _LIBCPP_STD_VER >= 20
45 using __standard_header_cstdalign _LIBCPP_DEPRECATED_("removed in C++20.") = void;
46 using __use_standard_header_cstdalign                                      = __standard_header_cstdalign;
48 #elif _LIBCPP_STD_VER >= 17
50 using __standard_header_cstdalign _LIBCPP_DEPRECATED = void;
51 using __use_standard_header_cstdalign                = __standard_header_cstdalign;
53 #endif
55 #endif // _LIBCPP_CSTDALIGN