3 #ifndef DUNE_FUNCTIONS_COMMON_TUPLEVECTOR_HH 4 #define DUNE_FUNCTIONS_COMMON_TUPLEVECTOR_HH 8 #include <dune/common/indices.hh> 23 using Base = std::tuple<T...>;
30 Base(
std::forward<TT>(tt)...)
38 template<std::
size_t i>
40 ->decltype(std::get<i>(*
this))
42 return std::get<i>(*this);
46 template<std::
size_t i>
48 ->decltype(std::get<i>(*
this))
50 return std::get<i>(*this);
54 static constexpr std::size_t
size()
56 return std::tuple_size<Base>::value;
A class augmenting std::tuple by element access via operator[].
Definition: tuplevector.hh:21
Definition: polynomial.hh:7
static constexpr std::size_t size()
Number of elements of the tuple.
Definition: tuplevector.hh:54
auto operator[](const Dune::index_constant< i > &) -> decltype(std::get< i >(*this))
Non-const access to the tuple elements.
Definition: tuplevector.hh:47
constexpr TupleVector()
Default constructor.
Definition: tuplevector.hh:34
constexpr TupleVector(TT &&... tt)
Construct from a set of arguments.
Definition: tuplevector.hh:29
auto operator[](const Dune::index_constant< i > &) const -> decltype(std::get< i >(*this))
Const access to the tuple elements.
Definition: tuplevector.hh:39