6 #ifndef DUNE_COMMON_TYPETREE_NODECONCEPTS_HH 7 #define DUNE_COMMON_TYPETREE_NODECONCEPTS_HH 13 #include <type_traits> 22 concept HasConstExprDegree =
requires(Node node)
24 std::bool_constant<(std::remove_cvref_t<Node>::degree(),
true)>();
28 concept HasPositiveDegree = ( std::remove_cvref_t<Node>::degree() > 0);
36 { std::as_const(node).degree() } -> std::convertible_to<std::size_t>;
43 std::remove_cvref_t<Node>::degree();
45 requires Impl::HasConstExprDegree<Node> and Impl::HasPositiveDegree<Node>;
47 node.child(
index_constant<(std::remove_cvref_t<Node>::degree()-1)>());
59 concept
InnerTreeNode = StaticDegreeInnerTreeNode<Node> || UniformInnerTreeNode<Node>;
67 #endif // DUNE_COMMON_TYPETREE_NODECONCEPTS_HH std::integral_constant< std::size_t, i > index_constant
An index constant with value i.
Definition: indices.hh:29
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
concept UniformInnerTreeNode
Model of an inner node of a typetree with uniform nodes accessible via runtime index.
Definition: nodeconcepts.hh:52
concept TreeNode
Model of a node of a typetree.
Definition: nodeconcepts.hh:34
concept InnerTreeNode
Model of an inner tree node of a typetree (either static degree or uniform)
Definition: nodeconcepts.hh:59
Traits for type conversions and type information.
Definition: nodeconcepts.hh:17
concept LeafTreeNode
Model of a leaf tree node of a typetree.
Definition: nodeconcepts.hh:63
Check if T is an integral constant or any type derived from std::integral_constant.
Definition: typetraits.hh:409
concept StaticDegreeInnerTreeNode
Model of an inner node of a typetree with compile time known degree and child access via index_consta...
Definition: nodeconcepts.hh:41