/sys$common/syshlp/helplib.hlb
CXXLSTD, Function Objects, binary_function

 *Conan The Librarian

 			   Standard C++	Library
 		 Copyright 1996, Rogue Wave Software, Inc.

 NAME

   binary_function  - Base class	for creating binary function objects.

 SYNOPSIS

   #include <functional>

   template <class Arg1,	class Arg2, class Result>
      struct binary_function{
 	  typedef Arg1 first_argument_type;
 	  typedef Arg2 second_argument_type;
 	  typedef Result result_type;
       };

 DESCRIPTION

   Function objects are objects with an operator() defined.  They are
   important for the effective use of	the standard library's generic
   algorithms, because the interface	for each algorithmic template
   can accept either an object with an operator() defined or a pointer
   to a function. The Standard C++ Library provides both a standard set
   of function objects,	and a pair of classes that you can use as the
   base for creating your own function objects.

   Function objects that	take two arguments are called binary function
   objects.  Binary function objects are	required to provide the
   typedefs first_argument_type, second_argument_type, and result_type.
   The binary_function class makes the task of creating templated
   binary function objects easier by providing the necessary typedefs
   for a binary function object.  You can create your own binary
   function  objects by inheriting from binary_function.

 SEE ALSO

   function objects_ unary_function, the	Function Objects section of
   the User's Guide.

 STANDARDS CONFORMANCE
   ANSI X3J16/ISO WG21 Joint C++	Committee
  Close     Help