Standard C++ Library Class Reference

Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
ptr_fun
Function Adaptor
Summary
A function that is overloaded to adapt a pointer to a function to work where a function is called
for.
Contents
Synopsis
Description
Example
Warning
See Also
Synopsis
#include <functional>
template<class Arg, class Result>
pointer_to_unary_function<Arg, Result>
ptr_fun (Result (*f)(Arg));
template<class Arg1, class Arg2, class Result>
pointer_to_binary_function<Arg1, Arg2, Result>
ptr_fun (Result (*x)(Arg1, Arg2));
Description
The pointer_to_unary_function and pointer_to_binary_function classes encapsulate pointers
to functions and provide an operator() so that the resulting object serves as a function object for