
On Wed, Oct 28, 2009 at 5:34 PM, Domagoj Saric <dsaritz@gmail.com> wrote:
And I *love* the idea about using a nop static func that throws, or perhaps asserts, all depending on policy settings for example. :)
well...here it is..."and more" ;-)
[...snip...] I'd love to see some of these improvements to boost::function. In particular, I'd like to be able to configure the size of the small buffer optimization. Of course, I'd also like it to still be compatible with function<>s of other sizes. ie boost::function<void (int), 16 > func16 = ...; boost::function<void (int), 12 > func12; func12 = func16; // need this to still work (ie operator= needs to be templatized on sbo size) Some of the other changes looked interesting as well. I do understand the rational of a single, simple shared_ptr<>, and that this might also apply to function<>. But I would think that templatized copy constructors, etc, could make all the boost::functions compatible with each other, regardless of policy. I think... Tony