Skip to content

iox::cxx::is_invocable_r🔗

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 <iceoryx_hoofs/cxx/type_traits.hpp>

Public Functions🔗

Name
template <typename C ,typename... As>
constexpr std::true_type
test(std::enable_if_t< std::is_convertible< typename cxx::invoke_result< C, As... >::type, ReturnType >::value > * )
template <typename C ,typename... As>
constexpr std::false_type
test(... )

Public Attributes🔗

Name
constexpr bool value

Detailed Description🔗

template <typename ReturnType ,
typename Callable ,
typename... ArgTypes>
struct iox::cxx::is_invocable_r;

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).

Public Functions Documentation🔗

function test🔗

template <typename C ,
typename... As>
static inline constexpr std::true_type test(
    std::enable_if_t< std::is_convertible< typename cxx::invoke_result< C, As... >::type, ReturnType >::value > * 
)

function test🔗

template <typename C ,
typename... As>
static inline constexpr std::false_type test(
    ... 
)

Public Attributes Documentation🔗

variable value🔗

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

Updated on 18 December 2023 at 13:02:34 CET