kblib 0.2.3
General utilities library for modern C++
kblib::fakestd::detail::invokable_r< Ret, Fp, Args > Struct Template Reference

#include <kblib/fakestd.h>

Public Types

using Result = decltype(try_call< Fp, Args... >(0))
 
using type = typename std::conditional< not std::is_same< Result, detail::nat >::value, typename std::conditional< std::is_void< Ret >::value, std::true_type, std::is_convertible< Result, Ret > >::type, std::false_type >::type
 

Static Public Member Functions

template<class XFp , class... XArgs>
static auto try_call (int) -> decltype(kblib::invoke(std::declval< XFp >(), std::declval< XArgs >()...))
 
template<class XFp , class... XArgs>
static auto try_call (...) -> detail::nat
 

Static Public Attributes

static const bool value = type::value
 

Detailed Description

template<class Ret, class Fp, class... Args>
struct kblib::fakestd::detail::invokable_r< Ret, Fp, Args >

Definition at line 387 of file fakestd.h.

Member Typedef Documentation

◆ Result

template<class Ret , class Fp , class... Args>
using kblib::fakestd::detail::invokable_r< Ret, Fp, Args >::Result = decltype(try_call<Fp, Args...>(0))

Definition at line 395 of file fakestd.h.

◆ type

template<class Ret , class Fp , class... Args>
using kblib::fakestd::detail::invokable_r< Ret, Fp, Args >::type = typename std::conditional< not std::is_same<Result, detail::nat>::value, typename std::conditional<std::is_void<Ret>::value, std::true_type, std::is_convertible<Result, Ret> >::type, std::false_type>::type

Definition at line 397 of file fakestd.h.

Member Function Documentation

◆ try_call() [1/2]

template<class Ret , class Fp , class... Args>
template<class XFp , class... XArgs>
static auto kblib::fakestd::detail::invokable_r< Ret, Fp, Args >::try_call (   ...) -> detail::nat
static

◆ try_call() [2/2]

template<class Ret , class Fp , class... Args>
template<class XFp , class... XArgs>
static auto kblib::fakestd::detail::invokable_r< Ret, Fp, Args >::try_call ( int  ) -> decltype(kblib::invoke(std::declval< XFp >(), std::declval< XArgs >()...))
static

Member Data Documentation

◆ value

template<class Ret , class Fp , class... Args>
const bool kblib::fakestd::detail::invokable_r< Ret, Fp, Args >::value = type::value
static

Definition at line 402 of file fakestd.h.


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