Boost.Function has several advantages over function pointers,
namely: Boost.Function allows arbitrary compatible function
objects to be targets (instead of requiring an exact function
signature). Boost.Function may be used with argument-binding and
other function object construction libraries. Boost.Function has
predictible behavior when an empty function object is called.
And, of course, function pointers have several advantages over
Boost.Function: Function pointers are smaller (the size of one
pointer instead of four or more) Function pointers are faster
(Boost.Function may require two calls through function pointers)
Function pointers are backward-compatible with C libraries. More
readable error messages. Function object wrappers will be the
size of a struct containing a member function pointer and two
data pointers. The actual size can vary significantly depending
on the underlying platform; on 32-bit Mac OS X with GCC, this
amounts to 16 bytes, while it is 32 bytes Windows with Visual
C++. Additionally,