Before using the function adaptors presented in these (sub)sections the
tthi(functional) header file must be included.
Member function adaptors are part of the Standard Template Library (STL). They
are most useful in combination with the em(generic algorithms), which is why
they are discussed in this chapter instead of the previous chapter which was
devoted to the STL.
The member function adaptors defined in the STL allow us to call
(parameterless) member functions of class objects as though they were
non-member functions and to compose unary or binary argument functions into
single function objects so that they can jointly be used with generic
algorithms.
In the next section calling member functions as non-member functions is
discussed; adaptable functions are covered thereafter.
|