#ifndef POINTER_TO_UNARY_FUNCTION_REFH #define POINTER_TO_UNARY_FUNCTION_REFH #include //for pointer_to_unary_function namespace std { template class pointer_to_unary_function: public unary_function { protected: Y (*p)(const X& x); public: pointer_to_unary_function(Y (*initial_p)(const X& x)): p(initial_p) {} Y operator()(const X& x) const {return (*p)(x);} }; } #endif