Boost logo

Boost :

Subject: Re: [boost] [function] function wrapping with no exceptionsafetyguarantee
From: David Abrahams (dave_at_[hidden])
Date: 2010-10-19 04:56:00


At Tue, 19 Oct 2010 01:06:00 -0700,
Emil Dotchevski wrote:
>
> On Tue, Oct 19, 2010 at 12:34 AM, Domagoj Saric <dsaritz_at_[hidden]> wrote:
> > "Emil Dotchevski" <emil_at_[hidden]> wrote in message
> > news:AANLkTi=1J3+hD0Oh3Le+6-jfnwDLYpTn_A7a6x=oZFnz_at_mail.gmail.com...
> >
> >> ... at worst they'd be mad that you've used
> >> Boost (that's common in games, for example.)
> >
> > Shall we disregard all those cases (of Boost rejection) as irrational rants
> > (as admittedly they often are, be it of the 'corporate policy' type or of
> > the Linus Torvalds type) or shall it be admitted that after all, sometimes,
> > they actually are based on real objections (that Boost, or parts of it, made
> > some not-so-happy efficiency compromising choices)...?
>
> You can't talk about Boost efficiency in general. As difficult as it
> is to pull apart, Boost contains individual components. Are we talking
> about the efficiency of Boost Function then? I'm sure if someone
> manages to speed it up, many people on this mailing list (not to
> mention the folks who are implementing std::function) would be very
> interested to see how it can be done.

I think we already know one way: we can easily get rid of the separate
empty() check by making sure empty boost::functions all invoke a
function that throws bad_function_call.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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