ptr_fun
Prototypetemplate <class Arg, class Result>
pointer_to_unary_function<Arg, Result>
ptr_fun(Result (*x)(Arg));
template <class Arg1, class Arg2, class Result>
pointer_to_binary_function<Arg1, Arg2, Result>
ptr_fun(Result (*x)(Arg1, Arg2));
Description
DefinitionDefined in the standard header functional, and in the nonstandard backward-compatibility header function.h. Requirements on typesThe argument must be a pointer to a function that takes either one or two arguments. The argument type(s) and the return type of the function are arbitrary, with the restriction that the function must return a value; it may not be a PreconditionsComplexityExampleSee the examples in the discussions of NotesSee alsofunctors, |