6#ifndef DUNE_TYPETREE_TYPETRAITS_HH 
    7#define DUNE_TYPETREE_TYPETRAITS_HH 
   10#include <dune/common/typetraits.hh> 
   12#include <dune/typetree/treepath.hh> 
   13#include <dune/typetree/nodeinterface.hh> 
   20  template<
typename... T>
 
   23  template<
typename T0, 
typename... T>
 
   24  struct first_type<T0,T...>
 
   34      struct yes { 
char dummy[1]; };
 
   35      struct no  { 
char dummy[2]; };
 
   38      static yes test(NodeTag<X> *);
 
   43      constexpr static bool value = 
sizeof(test<T>(0)) == 
sizeof(yes);
 
   46    template<
typename T, 
typename V>
 
   47    struct has_node_tag_value
 
   50      struct maybe { 
char dummy[N+1]; };
 
   51      struct yes { 
char dummy[2]; };
 
   52      struct no  { 
char dummy[1]; };
 
   55      static maybe<std::is_base_of<V, NodeTag<X>>::value>
 
   61      constexpr static bool value = 
sizeof(test<T>(0)) == 
sizeof(yes);
 
   65    struct has_implementation_tag
 
   67      struct yes { 
char dummy[1]; };
 
   68      struct no  { 
char dummy[2]; };
 
   71      static yes test(ImplementationTag<X> *);
 
   76      constexpr static bool value = 
sizeof(test<T>(0)) == 
sizeof(yes);
 
   79    template<
typename T, 
typename V>
 
   80    struct has_implementation_tag_value
 
   83      struct maybe { 
char dummy[N+1]; };
 
   84      struct yes { 
char dummy[2]; };
 
   85      struct no  { 
char dummy[1]; };
 
   88      static maybe<std::is_base_of<V, ImplementationTag<X>>::value>
 
   89      test(ImplementationTag<X> * a);
 
   94      constexpr static bool value = 
sizeof(test<T>(0)) == 
sizeof(yes);
 
  129      typedef typename F::type type;
 
  143      typedef typename std::conditional<
 
  144        std::is_base_of<meta_function,F>::value,
 
  155      constexpr auto isTreePath(
void*)
 
  158        return std::false_type();
 
  163      constexpr auto isTreePath(
const HybridTreePath<I...>*)
 
  166        return std::true_type();
 
  183      public decltype(impl::isTreePath((typename std::decay<T>::type*)(nullptr)))
 
  193    constexpr auto isTreePath(
const T&)
 
Check if type represents a tree path.
Definition: typetraits.hh:184
 
Helper meta function to delay evaluation of F.
Definition: typetraits.hh:128
 
Identity function.
Definition: typetraits.hh:135