Asylo
Functions
asylo::internal Namespace Reference

Functions

template<typename T >
constexpr bool HasStatus (decltype(std::declval< T >().status()) *)
 
template<typename T >
constexpr bool HasStatus (...)
 
template<typename T , typename std::enable_if< HasStatus< T >(nullptr), int >::type = 0>
auto ToStatus (T &&status_or) -> decltype(status_or.status())
 
template<typename T , typename std::enable_if<!HasStatus< T >(nullptr), int >::type = 0>
ToStatus (T &&status_like)
 

Function Documentation

◆ HasStatus() [1/2]

template<typename T >
constexpr bool asylo::internal::HasStatus ( decltype(std::declval< T >().status()) *  )
inline

◆ HasStatus() [2/2]

template<typename T >
constexpr bool asylo::internal::HasStatus (   ...)
inline

◆ ToStatus() [1/2]

template<typename T , typename std::enable_if< HasStatus< T >(nullptr), int >::type = 0>
auto asylo::internal::ToStatus ( T &&  status_or) -> decltype(status_or.status())
inline

◆ ToStatus() [2/2]

template<typename T , typename std::enable_if<!HasStatus< T >(nullptr), int >::type = 0>
T asylo::internal::ToStatus ( T &&  status_like)
inline