[boost::function] Retrieving function objects / Determining function type

Hi there, is it possible to get direct access to a function object encapsulated in boost::function ? And is it possible to determine whether boost::function has indeed stored a function object rather than, say, a function pointer ? Thanks and Best Regards, Ruediger

AMDG Ruediger Berlich wrote:
is it possible to get direct access to a function object encapsulated in boost::function ?
If you know that type of the function object, you can use target.
And is it possible to determine whether boost::function has indeed stored a function object rather than, say, a function pointer ?
You can get the typeid of the type that a boost::function contains
using the function target_type.
#include <iostream>
#include
participants (2)
-
Ruediger Berlich
-
Steven Watanabe