Template Class BoundUnaryFreeFunction
Defined in File function_objects.hpp
Inheritance Relationships
Base Type
public ecl::NullaryFunction< void >
(Template Class NullaryFunction)
Class Documentation
-
template<typename A, typename R = void>
class BoundUnaryFreeFunction : public ecl::NullaryFunction<void> Nullary function object for bound unary global/static functions.
Binds the argument to a unary global/static function and uses this to construct a nullary function object.
Usage:
void f(int i) {} int main() { BoundUnaryFreeFunction<int,void> function_object(f,1); function_object(); }
Note, often the use of generateFunctionObject is simpler.
See also
ecl::utilities::BoundUnaryFreeFunction<A,void>, generateFunctionObject, FunctionObjects.
- Template Parameters:
A – : the type of the argument to be bound.
R – : the return type.
Public Functions
-
inline BoundUnaryFreeFunction(R (*function)(A), A a)
Binds a unary function and creates a nullary function object.
Accepts both the function and a value for its single argument, binds them and creates a nullary function object.
- Parameters:
function – : the unary global/static function.
a – : the argument to bind.
-
inline virtual ~BoundUnaryFreeFunction()