6 #ifndef DUNE_COMMON_TYPETREE_TREEPATH_HH 7 #define DUNE_COMMON_TYPETREE_TREEPATH_HH 11 #include <type_traits> 42 template<
typename... T>
53 template<
typename... T>
55 [[nodiscard]] constexpr
auto treePath(
const T&... t)
68 using Dune::accumulate_back;
69 using Dune::accumulate_front;
72 using Dune::pop_front;
75 inline namespace Literals {
82 template <
char... digits>
83 constexpr
auto operator""_tp()
86 return treePath(
operator""_ic<digits...>());
98 #endif // DUNE_TYPETREE_TREEPATH_HH constexpr auto back(const HybridMultiIndex< T... > &tp) -> decltype(tp.back())
Returns a copy of the last element of the HybridMultiIndex.
Definition: hybridmultiindex.hh:225
constexpr auto reverse(const HybridMultiIndex< T... > &tp)
Reverses the order of the elements in the multi-index.
Definition: hybridmultiindex.hh:361
HybridMultiIndex(std::tuple< I... >) -> HybridMultiIndex< I... >
constexpr auto front(const HybridMultiIndex< T... > &tp) -> decltype(tp.front())
Returns a copy of the first element of the HybridMultiIndex.
Definition: hybridmultiindex.hh:238
constexpr HybridMultiIndex< std::size_t, T... > push_front(const HybridMultiIndex< T... > &tp, std::size_t i)
Prepends a run time index to a HybridMultiIndex.
Definition: hybridmultiindex.hh:284
Definition: childaccess.hh:23
Definition: indices.hh:130
Check if T is an std::integral_constant<I, i>
Definition: typetraits.hh:383
requires(((std::is_integral_v< T > or Dune::IsIntegralConstant< T >::value) &&...)) const expr auto treePath(const T &... t)
Constructs a new TreePath from the given indices.
Definition: treepath.hh:54
constexpr auto join(const HybridMultiIndex< Head... > &head, const Other &... tail)
Join two hybrid multi-indices into one.
Definition: hybridmultiindex.hh:355
A hybrid multi-index class that supports both compile time and run time indices.
Definition: hybridmultiindex.hh:80
Documentation related stuff.
Traits for type conversions and type information.
constexpr HybridMultiIndex< T..., std::size_t > push_back(const HybridMultiIndex< T... > &tp, std::size_t i)
Appends a run time index to a HybridMultiIndex.
Definition: hybridmultiindex.hh:249