30 #ifndef _GLIBCXX_EXPERIMENTAL_ARRAY
31 #define _GLIBCXX_EXPERIMENTAL_ARRAY 1
33 #pragma GCC system_header
35 #if __cplusplus >= 201402L
40 namespace std _GLIBCXX_VISIBILITY(default)
42 _GLIBCXX_BEGIN_NAMESPACE_VERSION
44 namespace experimental
46 inline namespace fundamentals_v2
48 #define __cpp_lib_experimental_make_array 201505
59 template<
typename _Dest,
typename... _Types>
60 struct __make_array_elem
65 template<
typename... _Types>
66 struct __make_array_elem<void, _Types...>
67 : common_type<_Types...>
73 template <
typename _Up>
74 struct __is_reference_wrapper<reference_wrapper<_Up>> :
true_type
77 static_assert(!__or_<__is_reference_wrapper<decay_t<_Types>>...>::value,
78 "make_array must be used with an explicit target type when"
79 "any of the arguments is a reference_wrapper");
83 template <
typename _Dest = void,
typename... _Types>
85 array<
typename __make_array_elem<_Dest, _Types...>::type,
sizeof...(_Types)>
88 return {{ std::forward<_Types>(__t)... }};
91 template <
typename _Tp,
size_t _Nm,
size_t... _Idx>
95 return {{__a[_Idx]...}};
99 template <
typename _Tp,
size_t _Nm>
100 constexpr array<remove_cv_t<_Tp>, _Nm>
101 to_array(_Tp (&__a)[_Nm])
111 _GLIBCXX_END_NAMESPACE_VERSION
116 #endif // _GLIBCXX_EXPERIMENTAL_ARRAY
constexpr array< typename __make_array_elem< _Dest, _Types...>::type, sizeof...(_Types)> make_array(_Types &&...__t)
Create a std::array from a variable-length list of arguments.
A standard container for storing a fixed size sequence of elements.
Class template integer_sequence.
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
typename remove_cv< _Tp >::type remove_cv_t
Alias template for remove_cv.
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.