STRUCT TEMPLATE(3)

NAME
boost::proto::is_callable - Boolean metafunction which tells whether a type is a callable PolymorphicFunctionObject or not.

SYNOPSIS

// In header: <boost/proto/traits.hpp>
template<typename T>
struct is_callable :  mpl::bool_<true-or-false> {
};

DESCRIPTION

proto::is_callable<> is used by the proto::when<> transform to determine whether a function type R(A1,...An) is a CallableTransform or an ObjectTransform. The former are evaluated using proto::call<> and the later with proto::make<>. If proto::is_callable<R>::value is true, the function type is a CallableTransform; otherwise, it is an ObjectTransform.

Unless specialized for a type T, proto::is_callable<T>::value is computed as follows:

    &#8226; If T is a template type X<Y0,...Yn>, where all Yx are types for x in [0,n], proto::is_callable<T>::value is boost::is_same<Yn, proto::callable>::value.

    &#8226; If T is derived from proto::callable, proto::is_callable<T>::value is true.

    &#8226; Otherwise, proto::is_callable<T>::value is false.