chromium/third_party/libc++/src/include/__type_traits/aligned_storage.h

//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_ALIGNED_STORAGE_H
#define _LIBCPP___TYPE_TRAITS_ALIGNED_STORAGE_H

#include <__config>
#include <__type_traits/conditional.h>
#include <__type_traits/integral_constant.h>
#include <__type_traits/nat.h>
#include <__type_traits/type_list.h>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#  pragma GCC system_header
#endif

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __align_type {};

struct __struct_double {};
struct __struct_double4 {};

// clang-format off
__all_types;
// clang-format on

template <size_t _Align>
struct _ALIGNAS(_Align) __fallback_overaligned {};

template <class _TL, size_t _Align>
struct __find_pod;

__find_pod<__type_list<_Hp, __nat>, _Align>;

__find_pod<__type_list<_Hp, _Tp>, _Align>;

template <class _TL, size_t _Len>
struct __find_max_align;

__find_max_align<__type_list<_Hp, __nat>, _Len>;

template <size_t _Len, size_t _A1, size_t _A2>
struct __select_align {};

__find_max_align<__type_list<_Hp, _Tp>, _Len>;

template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_TEMPLATE_VIS aligned_storage {};

#if _LIBCPP_STD_VER >= 14

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
aligned_storage_t;
_LIBCPP_SUPPRESS_DEPRECATED_POP

#endif

#define _CREATE_ALIGNED_STORAGE_SPECIALIZATION

_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
// PE/COFF does not support alignment beyond 8192 (=0x2000)
#if !defined(_LIBCPP_OBJECT_FORMAT_COFF)
_CREATE_ALIGNED_STORAGE_SPECIALIZATION;
#endif // !defined(_LIBCPP_OBJECT_FORMAT_COFF)

#undef _CREATE_ALIGNED_STORAGE_SPECIALIZATION

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ALIGNED_STORAGE_H