5#ifndef DUNE_COMMON_TUPLEVECTOR_HH
6#define DUNE_COMMON_TUPLEVECTOR_HH
36 using Base = std::tuple<T...>;
39 using TupleConstructorDetector =
decltype(Base(std::declval<TT&&>()...));
54 std::enable_if_t<hasTupleConstructor<TT...>::value,
int> = 0>
56 Base(
std::forward<TT>(tt)...)
66 template<std::
size_t i>
69 return std::get<i>(*
this);
74 template<std::
size_t i>
77 return std::get<i>(*
this);
81 static constexpr std::size_t
size()
83 return std::tuple_size<Base>::value;
Traits for type conversions and type information.
std::integral_constant< std::size_t, i > index_constant
An index constant with value i.
Definition indices.hh:30
typename detected_or< nonesuch, Op, Args... >::value_t is_detected
Detects whether Op<Args...> is valid.
Definition type_traits.hh:141
Dune namespace.
Definition alignedallocator.hh:13
constexpr auto makeTupleVector(T &&... t)
Definition tuplevector.hh:90
A class augmenting std::tuple by element access via operator[].
Definition tuplevector.hh:35
static constexpr std::size_t size()
Number of elements of the tuple.
Definition tuplevector.hh:81
constexpr TupleVector(TT &&... tt)
Construct from a set of arguments.
Definition tuplevector.hh:55
constexpr TupleVector()
Default constructor.
Definition tuplevector.hh:61