3 #ifndef DUNE_COMMON_TUPLEVECTOR_HH
4 #define DUNE_COMMON_TUPLEVECTOR_HH
34 using Base = std::tuple<T...>;
37 using TupleConstructorDetector = decltype(Base(std::declval<TT&&>()...));
52 std::enable_if_t<hasTupleConstructor<TT...>::value,
int> = 0>
54 Base(std::forward<TT>(tt)...)
64 template<std::
size_t i>
67 return std::get<i>(*
this);
72 template<std::
size_t i>
75 return std::get<i>(*
this);
79 static constexpr std::size_t
size()
81 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:28
typename detected_or< nonesuch, Op, Args... >::value_t is_detected
Detects whether Op<Args...> is valid.
Definition: type_traits.hh:326
Dune namespace.
Definition: alignedallocator.hh:11
constexpr auto makeTupleVector(T &&... t)
Definition: tuplevector.hh:88
A class augmenting std::tuple by element access via operator[].
Definition: tuplevector.hh:33
static constexpr std::size_t size()
Number of elements of the tuple.
Definition: tuplevector.hh:79
constexpr TupleVector(TT &&... tt)
Construct from a set of arguments.
Definition: tuplevector.hh:53
constexpr TupleVector()
Default constructor.
Definition: tuplevector.hh:59