version 3.10.0
Loading...
Searching...
No Matches
Dumux::Utility Namespace Reference

Namespaces

namespace  Detail

Classes

struct  Tag
 Helper class to create (named and comparable) tagged types Tags any given type. The tagged type is equality comparable and can be written to streams. A custom name can be provided by implementing the name() member function. More...

Functions

template<class T1, class T2>
constexpr bool operator== (Tag< T1 >, Tag< T2 >)
 Tags are equality comparable and return true if the tagged types are equal.
template<class T1, class T2>
constexpr bool operator!= (Tag< T1 >, Tag< T2 >)
template<class T, std::enable_if_t< std::is_base_of_v< Tag< T >, T >, int > = 0>
auto operator<< (std::ostream &os, const T &t) -> std::enable_if_t< decltype(Detail::hasName(t))::value, std::ostream & >
 Return the class name of the tagged type calling t.name().
template<class T, std::enable_if_t< std::is_base_of_v< Tag< T >, T >, int > = 0>
auto operator<< (std::ostream &os, const T &t) -> std::enable_if_t<!decltype(Detail::hasName(t))::value, std::ostream & >
 Return the class name of the tagged type calling Dune::className if t.name() doesn't exist.

Function Documentation

◆ operator!=()

template<class T1, class T2>
bool Dumux::Utility::operator!= ( Tag< T1 > ,
Tag< T2 >  )
inlineconstexpr

◆ operator<<() [1/2]

template<class T, std::enable_if_t< std::is_base_of_v< Tag< T >, T >, int > = 0>
auto Dumux::Utility::operator<< ( std::ostream & os,
const T & t )->std::enable_if_t< decltype(Detail::hasName(t))::value, std::ostream & >

◆ operator<<() [2/2]

template<class T, std::enable_if_t< std::is_base_of_v< Tag< T >, T >, int > = 0>
auto Dumux::Utility::operator<< ( std::ostream & os,
const T & t )->std::enable_if_t<!decltype(Detail::hasName(t))::value, std::ostream & >

◆ operator==()

template<class T1, class T2>
bool Dumux::Utility::operator== ( Tag< T1 > ,
Tag< T2 >  )
inlineconstexpr