
function_test and function_n_test test most of these, but without the user-supplied allocator. You could probably hack up those.
I'll take a look.
Thanks for implementing this, and so quickly!
No problem.
Looking briefly through the code... I see that you're not actually storing the value of the allocator object itself along with the function object. Was that decision intentional, or were you just following the behavior of the existing boost::function?
I am storing the allocator, in struct functor_wrapper from function_base.hpp, but it has a partial specialization for std::allocator which doesn't store the allocator, and perhaps that's what you saw. Please take another look: http://www.revergestudios.com/boost-function/function_base.hpp Of course if the function object can use the small object optimization, the functor_wrapper template is not used and no copy of the allocator is stored in the boost::function.
I haven't done a thorough review of the code, but I'd be inclined to move boost::function toward this approach. It's a better extension to tr1::function than the existing code, and it might be the right way for C++0x's "function" to go. If you're interested in this feature going into the next standard, I suggest writing a short proposal to the C++ Library Working Group for this extension.
Will do. Emil Dotchevski