|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-01-28 13:08:49
From: "Aleksey Gurtovoy" <alexy_at_[hidden]>
> David Abrahams wrote:
> > As an optimization, it should be possible to detect free and
> > member function arguments to the constructor of function<>
> > and treat them as though they were passed with ref(),
> > eliminating the need for dynamic allocations in many
> > cases.
>
> I had that same idea for a while as well. FWIW, if 'boost::function<>'
> didn't perform dynamic allocation on something as simple as 'f =
> boost::bind(&my::foo, this)' (and provided a non-throw guarantee for such
> operations), we would have switched to it long time ago :).
The "small string" optimization? But how would function<> ensure the proper
alignment for the function object type?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk