Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-03 08:13:45

0001 //===----------------------------------------------------------------------===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef _LIBCPP___CXX03___UTILITY_IN_PLACE_H
0010 #define _LIBCPP___CXX03___UTILITY_IN_PLACE_H
0011 
0012 #include <__cxx03/__config>
0013 #include <__cxx03/__type_traits/remove_cvref.h>
0014 #include <__cxx03/cstddef>
0015 
0016 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0017 #  pragma GCC system_header
0018 #endif
0019 
0020 _LIBCPP_BEGIN_NAMESPACE_STD
0021 
0022 #if _LIBCPP_STD_VER >= 17
0023 
0024 struct _LIBCPP_EXPORTED_FROM_ABI in_place_t {
0025   explicit in_place_t() = default;
0026 };
0027 inline constexpr in_place_t in_place{};
0028 
0029 template <class _Tp>
0030 struct _LIBCPP_TEMPLATE_VIS in_place_type_t {
0031   _LIBCPP_HIDE_FROM_ABI explicit in_place_type_t() = default;
0032 };
0033 template <class _Tp>
0034 inline constexpr in_place_type_t<_Tp> in_place_type{};
0035 
0036 template <size_t _Idx>
0037 struct _LIBCPP_TEMPLATE_VIS in_place_index_t {
0038   _LIBCPP_HIDE_FROM_ABI explicit in_place_index_t() = default;
0039 };
0040 template <size_t _Idx>
0041 inline constexpr in_place_index_t<_Idx> in_place_index{};
0042 
0043 template <class _Tp>
0044 struct __is_inplace_type_imp : false_type {};
0045 template <class _Tp>
0046 struct __is_inplace_type_imp<in_place_type_t<_Tp>> : true_type {};
0047 
0048 template <class _Tp>
0049 using __is_inplace_type = __is_inplace_type_imp<__remove_cvref_t<_Tp>>;
0050 
0051 template <class _Tp>
0052 struct __is_inplace_index_imp : false_type {};
0053 template <size_t _Idx>
0054 struct __is_inplace_index_imp<in_place_index_t<_Idx>> : true_type {};
0055 
0056 template <class _Tp>
0057 using __is_inplace_index = __is_inplace_index_imp<__remove_cvref_t<_Tp>>;
0058 
0059 #endif // _LIBCPP_STD_VER >= 17
0060 
0061 _LIBCPP_END_NAMESPACE_STD
0062 
0063 #endif // _LIBCPP___CXX03___UTILITY_IN_PLACE_H