29 #ifndef _GLIBCXX_EXPERIMENTAL_ARRAY 30 #define _GLIBCXX_EXPERIMENTAL_ARRAY 1 32 #pragma GCC system_header 34 #if __cplusplus <= 201103L 41 namespace std _GLIBCXX_VISIBILITY(default)
43 namespace experimental
45 inline namespace fundamentals_v2
47 _GLIBCXX_BEGIN_NAMESPACE_VERSION
49 #define __cpp_lib_experimental_make_array 201505 60 template <
typename _Up>
64 template <
typename _Up>
65 struct __is_reference_wrapper<reference_wrapper<_Up>> :
true_type 68 template <
typename _Dest = void,
typename... _Types>
70 make_array(_Types&&... __t)
71 -> array<conditional_t<is_void_v<_Dest>,
72 common_type_t<_Types...>,
77 __not_<is_void<_Dest>>,
78 __and_<__not_<__is_reference_wrapper<decay_t<_Types>>>...>>
80 "make_array cannot be used without an explicit target type " 81 "if any of the types given is a reference_wrapper");
82 return {{forward<_Types>(__t)...}};
85 template <
typename _Tp,
size_t _Nm,
size_t... _Idx>
86 constexpr array<remove_cv_t<_Tp>, _Nm>
87 __to_array(_Tp (&__a)[_Nm],
88 index_sequence<_Idx...>)
90 return {{__a[_Idx]...}};
93 template <
typename _Tp,
size_t _Nm>
94 constexpr array<remove_cv_t<_Tp>, _Nm>
95 to_array(_Tp (&__a)[_Nm])
97 return __to_array(__a, make_index_sequence<_Nm>{});
101 _GLIBCXX_END_NAMESPACE_VERSION
109 #endif // _GLIBCXX_EXPERIMENTAL_ARRAY ISO C++ entities toplevel namespace is std.
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.