29 #ifndef _GLIBCXX_EXPERIMENTAL_ARRAY
30 #define _GLIBCXX_EXPERIMENTAL_ARRAY 1
32 #pragma GCC system_header
34 #if __cplusplus <= 201103L
42 namespace std _GLIBCXX_VISIBILITY(default)
44 namespace experimental
46 inline namespace fundamentals_v2
48 _GLIBCXX_BEGIN_NAMESPACE_VERSION
50 #define __cpp_lib_experimental_make_array 201505
61 template <
typename _Up>
65 template <
typename _Up>
66 struct __is_reference_wrapper<reference_wrapper<_Up>> :
true_type
69 template <
typename _Dest = void,
typename... _Types>
71 make_array(_Types&&... __t)
72 -> array<conditional_t<is_void_v<_Dest>,
73 common_type_t<_Types...>,
78 __not_<is_void<_Dest>>,
79 __and_<__not_<__is_reference_wrapper<decay_t<_Types>>>...>>
81 "make_array cannot be used without an explicit target type "
82 "if any of the types given is a reference_wrapper");
83 return {{forward<_Types>(__t)...}};
86 template <
typename _Tp,
size_t _Nm,
size_t... _Idx>
87 constexpr array<remove_cv_t<_Tp>, _Nm>
88 __to_array(_Tp (&__a)[_Nm],
89 index_sequence<_Idx...>)
91 return {{__a[_Idx]...}};
94 template <
typename _Tp,
size_t _Nm>
95 constexpr array<remove_cv_t<_Tp>, _Nm>
96 to_array(_Tp (&__a)[_Nm])
98 return __to_array(__a, make_index_sequence<_Nm>{});
102 _GLIBCXX_END_NAMESPACE_VERSION
110 #endif // _GLIBCXX_EXPERIMENTAL_ARRAY
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.