is_invocable

Description

The is_invocable metafunction checks if the function is callable with certain parameters.

Requirements

F must be:

Synopsis

template<class F, class... Ts>
struct is_invocable;

Example

#include <boost/hof.hpp>
using namespace boost::hof;

struct is_invocable_class
{
    void operator()(int) const
    {
    }
};
static_assert(is_invocable<is_invocable_class, int>(), "Not callable");

int main() {}