
Allow me to clarify On Fri, Sep 17, 2010 at 6:34 PM, Steven Watanabe <watanabesj@gmail.com> wrote:
AMDG
David Sankel wrote:
Is a boost::function<void (int)> semantically different from a boost::function<void (int &)>
Yes. The signature of a boost::function behaves exactly the same way as the signature of a normal function.
The difference being, for example, that if you wrap a void(*)(int&) in the 2nd one, it will receive a reference to the actual argument.
or a boost::function<void (const int)>?
No. boost::function<void(int)> is the same type as boost::function<void(const int)>.
because the type void (int) is actually equivalent to the type void(const int). Constness of parameters is discarded except in the implementation of a function. -- Dave Abrahams BoostPro Computing http://www.boostpro.com