ASL
|
A simple function object that can wrap a function pointer, a functor or a lambda.
The first parameter is the return type, which can be void
, and the rest, if given, are argument types. Currently supports up to 2 arguments.
In C++11 you can do this (in older C++ you would assign a function pointer or a class object implementing operator()
):
A default constructed Function object is null and cannot be invoked. You can check if the function has been initialized with the bool
conversion:
Be aware that currently Function objects copied invalidate the source object. This might change in the future.
#include <util.h>