3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
Dumux::Properties::Detail Namespace Reference

implementation details for template meta programming More...

Description

implementation details for template meta programming

Classes

struct  GetDefined
 helper struct to get the first property that is defined in the TypeTag hierarchy More...
struct  GetNextTypeTag
 helper struct to iteratre over the TypeTag hierarchy More...
struct  GetNextTypeTag< TypeTag, Property, std::tuple< LastTypeTag >, std::enable_if_t< hasParentTypeTag< LastTypeTag >(int{}), void > >
struct  GetNextTypeTag< TypeTag, Property, std::tuple< LastTypeTag >, std::enable_if_t<!hasParentTypeTag< LastTypeTag >(int{}), void > >
struct  GetNextTypeTag< TypeTag, Property, std::tuple< FirstTypeTag, Args... >, std::enable_if_t< hasParentTypeTag< FirstTypeTag >(int{}), void > >
struct  GetNextTypeTag< TypeTag, Property, std::tuple< FirstTypeTag, Args... >, std::enable_if_t<!hasParentTypeTag< FirstTypeTag >(int{}), void > >
struct  GetDefined< TypeTag, Property, std::tuple< LastTypeTag > >
struct  GetDefined< TypeTag, Property, std::tuple< FirstTypeTag, Args... > >
struct  GetPropImpl
 helper struct to extract get the Property specilization given a TypeTag, asserts that the property is defined More...
struct  GetTypeTagInheritance
struct  GetTypeTagInheritance< std::tuple< OneTypeTag > >
struct  GetTypeTagInheritance< std::tuple< FirstTypeTag, OtherTypeTags... > >

Typedefs

template<class ... Tuples>
using ConCatTuples = decltype(std::tuple_cat(std::declval<Tuples>()...))
 helper alias to concatenate multiple tuples

Functions

template<class P>
constexpr auto isDefinedProperty (int) -> decltype(std::integral_constant< bool, !std::is_same< typename P::type, UndefinedProperty >::value >{})
 check if a property P is defined
template<class P>
constexpr std::true_type isDefinedProperty (...)
 fall back if a Property is defined
template<class T>
constexpr auto hasParentTypeTag (int) -> decltype(std::declval< typename T::InheritsFrom >(), std::enable_if_t<!std::is_same< typename T::InheritsFrom, void >::value, int >{}, std::true_type{})
template<class T>
constexpr std::false_type hasParentTypeTag (...)
 fall back if a TypeTag doesn't inherit

Typedef Documentation

◆ ConCatTuples

template<class ... Tuples>
using Dumux::Properties::Detail::ConCatTuples = decltype(std::tuple_cat(std::declval<Tuples>()...))

helper alias to concatenate multiple tuples

Function Documentation

◆ hasParentTypeTag() [1/2]

template<class T>
std::false_type Dumux::Properties::Detail::hasParentTypeTag ( ...)
constexpr

fall back if a TypeTag doesn't inherit

◆ hasParentTypeTag() [2/2]

template<class T>
auto Dumux::Properties::Detail::hasParentTypeTag ( int ) -> decltype(std::declval< typename T::InheritsFrom >(), std::enable_if_t<!std::is_same< typename T::InheritsFrom, void >::value, int >{}, std::true_type{})
constexpr

check if a TypeTag inherits from other TypeTags the enable_if portion of decltype is only needed for the macro hack to work, if no macros are in use anymore it can be removed, i.e. then trailing return type is then -> decltype(std::declval<typename T::InheritsFrom>(), std::true_type{})

◆ isDefinedProperty() [1/2]

template<class P>
std::true_type Dumux::Properties::Detail::isDefinedProperty ( ...)
constexpr

fall back if a Property is defined

◆ isDefinedProperty() [2/2]

template<class P>
auto Dumux::Properties::Detail::isDefinedProperty ( int ) -> decltype(std::integral_constant< bool, !std::is_same< typename P::type, UndefinedProperty >::value >{})
constexpr

check if a property P is defined