Boolean metafunction which detects whether a type is a callable function object type or not. More...
#include <traits.hpp>


Boolean metafunction which detects whether a type is a callable function object type or not.
is_callable<> is used by the when<> transform to determine whether a function type R(A1,A2,...AN) is a callable transform or an object transform. (The former are evaluated using call<> and the later with make<>.) If is_callable<R>value is true, the function type is a callable transform; otherwise, it is an object transform.
Unless specialized for a type T, is_callable<T>value is computed as follows:
T is a template type X<Y0,Y1,...YN>, where all Yx are types for x in [0,N], is_callable<T>value is is_same<YN, proto::callable>value. T has a nested type proto_is_callable_ that is a typedef for void, is_callable<T>value is true. (Note: this is the case for any type that derives from proto::callable.) is_callable<T>value is false.