Boost logo

Boost :

From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2007-08-21 09:57:09


Steven Watanabe wrote:

> 2) function::function can throw

I don't know how boost::function is implemented, but it should be
possible that it can only throw if the function object contains state.
And I think that should seldom happen.

If it doesn't contain state, it should be possible to fallback to a
two-pointer representation, where function owns nothing (and thus
doesn't need to allocate memory) and only references code and context.
(that is to say, std::nested_function from the lambda proposal)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk