Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
std::unary_function is deprecated [2,3].
std::unary_function is an empty class that serves as the base class of a unary functor. A unary functor defines operator(), where operator() takes one argument.
The advantage of using std::unary_function is its (two) typedefs, so that the derived functors fits into more algorithms. Make functors adaptable [1].
#include <algorithm> |
Simplified from the GNU ISO C++ Library, version 4.7.2:
template<typename _Arg, typename _Result> |
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.