pointer_to_unary_function (3C++std) - Tru64 UNIX
Standard C++ LibraryCopyright 1996, Rogue Wave Software, Inc. NAME
pointer_to_unary_function - A function object class that adapts a pointer
to a function to work where a unary_function is called for.
SYNOPSIS
#include <functional>
template <class Arg, class Result>
class pointer_to_unary_function : public unary_function<Arg, Result>;
DESCRIPTION
The pointer_to_unary_function class encapsulates a pointer to a single-
argument function. The class provides an operator() so that the resulting
object serves as a function object for that function.
The ptr_fun function is overloaded to create instances of
pointer_to_unary_function when provided with the appropriate pointer to a
function.
INTERFACE
template <class Arg, class Result>
class pointer_to_unary_function : public unary_function<Arg, Result> {
public:
typedef typename unary_function<Arg,Result>::argument_type
argument_type;
typedef typename unary_function<Arg,Result>::result_type
result_type;
explicit pointer_to_unary_function (Result (*f)(Arg));
Result operator() (const Arg&) const;
};
template<class Arg, class Result>
pointer_to_unary_function<Arg, Result>
ptr_fun (Result (*f)(Arg));
SEE ALSO
function_objects, pointer_to_binary_function, ptr_fun, unary_function
STANDARDS CONFORMANCE
ANSI X3J16/ISO WG21 Joint C++ Committee
|