Opm::Properties::Detail Namespace Reference

implementation details for template meta programming More...

Classes

struct  GetDefined
 helper struct to get the first property that is defined in the TypeTag hierarchy More...
 
struct  GetDefined< TypeTag, Property, std::tuple< FirstTypeTag, Args... > >
 
struct  GetDefined< TypeTag, Property, std::tuple< LastTypeTag > >
 
struct  GetDefinedSplice
 helper struct to get the first property that is defined in the TypeTag hierarchy More...
 
struct  GetDefinedSplice< TypeTag, std::tuple< FirstTypeTag, Args... > >
 
struct  GetDefinedSplice< TypeTag, std::tuple< LastTypeTag > >
 
struct  GetNextSpliceTypeTag
 helper struct to iterate over the TypeTag hierarchy More...
 
struct  GetNextSpliceTypeTag< TypeTag, std::tuple< FirstTypeTag, Args... >, std::enable_if_t< hasParentTypeTag< FirstTypeTag >(int{}), void > >
 
struct  GetNextSpliceTypeTag< TypeTag, std::tuple< FirstTypeTag, Args... >, std::enable_if_t<!hasParentTypeTag< FirstTypeTag >(int{}), void > >
 
struct  GetNextSpliceTypeTag< TypeTag, std::tuple< LastTypeTag >, std::enable_if_t< hasParentTypeTag< LastTypeTag >(int{}), void > >
 
struct  GetNextSpliceTypeTag< TypeTag, std::tuple< LastTypeTag >, std::enable_if_t<!hasParentTypeTag< LastTypeTag >(int{}), void > >
 
struct  GetNextTypeTag
 helper struct to iterate over the TypeTag hierarchy More...
 
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  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  GetPropImpl
 helper struct to extract get the Property specilization given a TypeTag, asserts that the property is defined More...
 
struct  GetSplicePropImpl
 

Typedefs

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

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 More...
 
template<class P >
constexpr std::true_type isDefinedProperty (...)
 fall back if a Property is defined More...
 
template<class T >
constexpr auto hasParentTypeTag (int) -> decltype(std::declval< typename T::InheritsFrom >(), std::true_type{})
 check if a TypeTag inherits from other TypeTags More...
 
template<class T >
constexpr std::false_type hasParentTypeTag (...)
 fall back if a TypeTag doesn't inherit More...
 
template<class S >
constexpr auto isDefinedSplice (int) -> decltype(std::integral_constant< bool, !std::is_same< typename S::type, std::tuple<> >::value >{})
 check if a splice S is defined More...
 
template<class S >
constexpr std::true_type isDefinedSplice (...)
 fall back if a splice is defined More...
 

Detailed Description

implementation details for template meta programming

Typedef Documentation

◆ ConCatTuples

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

helper alias to concatenate multiple tuples

Function Documentation

◆ hasParentTypeTag() [1/2]

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

fall back if a TypeTag doesn't inherit

◆ hasParentTypeTag() [2/2]

template<class T >
constexpr auto Opm::Properties::Detail::hasParentTypeTag ( int  ) -> decltype(std::declval<typename T::InheritsFrom>(), std::true_type{})
constexpr

check if a TypeTag inherits from other TypeTags

◆ isDefinedProperty() [1/2]

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

fall back if a Property is defined

◆ isDefinedProperty() [2/2]

template<class P >
constexpr auto Opm::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

◆ isDefinedSplice() [1/2]

template<class S >
constexpr std::true_type Opm::Properties::Detail::isDefinedSplice (   ...)
constexpr

fall back if a splice is defined

◆ isDefinedSplice() [2/2]

template<class S >
constexpr auto Opm::Properties::Detail::isDefinedSplice ( int  ) -> decltype(std::integral_constant<bool, !std::is_same<typename S::type, std::tuple<>>::value>{})
constexpr

check if a splice S is defined