Utopia  2
Framework for studying models of complex & adaptive systems.
Classes | Static Public Attributes | Private Types | Static Private Member Functions | List of all members
Utopia::Utils::is_callable< T, std::void_t< std::enable_if_t< std::is_class_v< std::decay_t< T > >, T > > > Class Template Reference

Determines if the type T implements a call operator with arbitrary signature. More...

#include <type_traits.hh>

Classes

struct  Check
 
struct  Derived
 
struct  Fallback
 

Static Public Attributes

static constexpr bool value = (sizeof(f< Derived >(nullptr)) == 1)
 

Private Types

typedef char True[1]
 
typedef char False[2]
 

Static Private Member Functions

template<typename S >
static constexpr Truef (...)
 
template<typename S >
static constexpr Falsef (Check< void(Fallback::*)(), &S::operator()> *)
 

Detailed Description

template<typename T>
class Utopia::Utils::is_callable< T, std::void_t< std::enable_if_t< std::is_class_v< std::decay_t< T > >, T > > >

Determines if the type T implements a call operator with arbitrary signature.

Template Parameters
TType to check

Member Typedef Documentation

◆ False

template<typename T >
typedef char Utopia::Utils::is_callable< T, std::void_t< std::enable_if_t< std::is_class_v< std::decay_t< T > >, T > > >::False[2]
private

◆ True

template<typename T >
typedef char Utopia::Utils::is_callable< T, std::void_t< std::enable_if_t< std::is_class_v< std::decay_t< T > >, T > > >::True[1]
private

Member Function Documentation

◆ f() [1/2]

template<typename T >
template<typename S >
static constexpr True& Utopia::Utils::is_callable< T, std::void_t< std::enable_if_t< std::is_class_v< std::decay_t< T > >, T > > >::f (   ...)
staticconstexprprivate

◆ f() [2/2]

template<typename T >
template<typename S >
static constexpr False& Utopia::Utils::is_callable< T, std::void_t< std::enable_if_t< std::is_class_v< std::decay_t< T > >, T > > >::f ( Check< void(Fallback::*)(), &S::operator()> *  )
staticconstexprprivate

Member Data Documentation

◆ value

template<typename T >
constexpr bool Utopia::Utils::is_callable< T, std::void_t< std::enable_if_t< std::is_class_v< std::decay_t< T > >, T > > >::value = (sizeof(f< Derived >(nullptr)) == 1)
staticconstexpr

The documentation for this class was generated from the following file: