Loading...
Searching...
No Matches
TreePath
TypeTree
Collaboration diagram for TreePath:

## Namespaces

namespace | Dune::TypeTree::Literals

## Typedefs

template<typename... T>
using | Dune::TypeTree::TreePath = Dune::HybridMultiIndex<T...>
| A type for representing tree paths that supports both compile time and run time indices.

## Functions

template<typename... T> requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))
constexpr auto | Dune::TypeTree::treePath (const T &... t)
| Constructs a new TreePath from the given indices.

## Detailed Description

## Typedef Documentation

## TreePath

template<typename... T>

using Dune::TypeTree::TreePath = Dune::HybridMultiIndex<T...>

A type for representing tree paths that supports both compile time and run time indices.

A TreePath supports storing a combination of run time and compile time indices. This makes it possible to store the tree path to a tree node inside the tree node itself, even if the path contains one or more PowerNodes, where each child must have exactly the same type. At the same time, as much information as possible is kept accessible at compile time, allowing for more efficient algorithms.

Note
  Internally all indices are stored as std::size_t or std::integral_constant<std::size_t,v>. The latter is the same as Dune::index_constant<v>. If indices of other integral or std::integral_constant types are passed as arguments, they are converted.
  This is an alias for HybridMultiIndex

## Function Documentation

## treePath()

template<typename... T>
requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))

auto Dune::TypeTree::treePath | ( | const T &... | t | ) |

nodiscard constexpr

Constructs a new TreePath from the given indices.

This function returns a new TreePath with the given index values. It exists mainly to avoid having to manually specify the exact type of the new object.

It further ensures that the basic number type is std::size_t and casts any indices accordingly.