std::is_invocable, std::is_invocable_r, std::is_nothrow_invocable, std::is_nothrow_invocable_r

Header: <type_traits>

  1. Determines whether INVOKE(std::declval(), std::declval()…) is well formed when treated as an unevaluated operand.

# Declarations

template< class Fn, class... ArgTypes >
struct is_invocable;

(since C++17)

template< class R, class Fn, class... ArgTypes >
struct is_invocable_r;

(since C++17)

template< class Fn, class... ArgTypes >
struct is_nothrow_invocable;

(since C++17)

template< class R, class Fn, class... ArgTypes >
struct is_nothrow_invocable_r;

(since C++17)

# Notes

Feature-test macro Value Std Feature __cpp_lib_is_invocable 201703L (C++17) std::is_invocable, std::invoke_result

# See also