Class Functor

template<typename R, typename A1 = __functor_empty, typename A2 = __functor_empty>
class Functor

Implements an adaptable function object in compliance with the STL.

The Functor template class implements a an adaptable function object interface using the excellent syntax found in the Tiny Template Library. Functors are instantiated as in the following examples:

// one integer argument, returns double
Functor< double(int) > f1;

// two string arguments, returns boolean
Functor< bool(string, string) > f2;

They are then called as a normal function would be called, e.g.

string s1, s2;
if ( f2(s1, s2) )
{
  double x = f1(13);
}