16 template<
typename... T_Args>
21 template<std::
size_t I,
typename T>
28 template<
typename IndexSequence,
typename... T_Args>
31 template<std::size_t... Is,
typename... T_Args>
34 template<
typename... T_CArgs>
35 constexpr TupleImpl(T_CArgs&&... us)
noexcept((std::is_nothrow_constructible_v<T_Args, T_CArgs&&> && ...))
40 constexpr TupleImpl()
requires(std::is_default_constructible_v<T_Args> && ...)
50 template<
typename... T_Args>
56 template<
typename... T_CArgs>
58 sizeof...(T_Args) ==
sizeof...(T_CArgs) &&
sizeof...(T_Args) > 0
59 && (!std::is_same_v<std::remove_cvref_t<std::tuple_element_t<0, std::tuple<T_CArgs...>>>,
Tuple>)
60 && (std::is_constructible_v<T_Args, T_CArgs &&> && ...))
61 constexpr
Tuple(T_CArgs&&... us) noexcept((
std::is_nothrow_constructible_v<T_Args, T_CArgs&&> && ...))
62 :
Base(
std::forward<T_CArgs>(us)...)
66 constexpr Tuple()
requires(std::is_default_constructible_v<T_Args> && ...)
75 constexpr auto const&
get()
const
77 static_assert(I <
sizeof...(T_Args),
"Index is outside of the allowed range.");
84 static_assert(I <
sizeof...(T_Args),
"Index is outside of the allowed range.");
91 template<
typename... T_Args>
94 template<
size_t T_
idx>
109 template<
typename... T_Args>
110 struct tuple_size<
alpaka::Tuple<T_Args...>> : std::integral_constant<std::size_t, sizeof...(T_Args)>
114 template<std::size_t I,
typename... T_Args>
115 struct tuple_element<I,
alpaka::Tuple<T_Args...>>
#define ALPAKA_FORWARD(instance)
Perfectly forward an instance as argument.
Validates if T is a specialization of the unspecialized template type U.
constexpr auto makeTuple(auto &&... args)
constexpr decltype(auto) get(concepts::SpecializationOf< Dict > auto &t) noexcept
Tuple(T_Args &&...) -> Tuple< T_Args... >
basic tuple implementation
detail::TupleImpl< std::make_index_sequence< sizeof...(T_Args)>, T_Args... > Base
std::tuple< T_Args... > StdTuple
constexpr Tuple()=default
constexpr Tuple(T_CArgs &&... us) noexcept((std::is_nothrow_constructible_v< T_Args, T_CArgs && > &&...))
constexpr auto const & get() const
get element by index
constexpr auto & get()
get element by index
constexpr TupleImpl(T_CArgs &&... us) noexcept((std::is_nothrow_constructible_v< T_Args, T_CArgs && > &&...))
constexpr TupleImpl()=default
typename std::tuple_element_t< I, typename alpaka::Tuple< T_Args... >::StdTuple > type