iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
iox2::legacy::is_invocable_r< ReturnType, Callable, ArgTypes > Struct Template Reference

Verifies whether the passed Callable type is in fact invocable with the given arguments and the result of the invocation is convertible to ReturnType. More...

#include <type_traits.hpp>

Static Public Member Functions

template<typename C , typename... As>
static constexpr std::true_type test (std::enable_if_t< std::is_convertible< typename iox2::legacy::invoke_result< C, As... >::type, ReturnType >::value > *) noexcept
 
template<typename C , typename... As>
static constexpr std::false_type test (...) noexcept
 

Static Public Attributes

static constexpr bool value { decltype(test<Callable, ArgTypes...>(nullptr))::value }
 

Detailed Description

template<typename ReturnType, typename Callable, typename... ArgTypes>
struct iox2::legacy::is_invocable_r< ReturnType, Callable, ArgTypes >

Verifies whether the passed Callable type is in fact invocable with the given arguments and the result of the invocation is convertible to ReturnType.

Note
This is an implementation of std::is_invokable_r (C++17).

Definition at line 89 of file type_traits.hpp.

Member Function Documentation

◆ test() [1/2]

template<typename ReturnType , typename Callable , typename... ArgTypes>
template<typename C , typename... As>
static constexpr std::false_type iox2::legacy::is_invocable_r< ReturnType, Callable, ArgTypes >::test (   ...)
inlinestaticconstexprnoexcept

Definition at line 100 of file type_traits.hpp.

◆ test() [2/2]

template<typename ReturnType , typename Callable , typename... ArgTypes>
template<typename C , typename... As>
static constexpr std::true_type iox2::legacy::is_invocable_r< ReturnType, Callable, ArgTypes >::test ( std::enable_if_t< std::is_convertible< typename iox2::legacy::invoke_result< C, As... >::type, ReturnType >::value > *  )
inlinestaticconstexprnoexcept

Definition at line 92 of file type_traits.hpp.

Member Data Documentation

◆ value

template<typename ReturnType , typename Callable , typename... ArgTypes>
constexpr bool iox2::legacy::is_invocable_r< ReturnType, Callable, ArgTypes >::value { decltype(test<Callable, ArgTypes...>(nullptr))::value }
staticconstexpr

Definition at line 105 of file type_traits.hpp.


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