Boost logo

Boost :

Subject: Re: [boost] [function] "paranoia" vs efficiency
From: David Abrahams (dave_at_[hidden])
Date: 2009-11-04 22:11:55

on Thu Oct 29 2009, "Stewart, Robert" <> wrote:

>> the boost::function documentation states that virtual
>> functions are not used
>> because they cause code bloat but comparing the actual
>> binaries and code
>> generated i found boost::function to actually be worse in
>> that respect than the
>> std::tr1::function implementation provided with msvc++ 9.0
>> SP1 (that does use virtual functions)...
> The claim was made years ago and is for a library that doesn't have the benefit of
> being written by those with direct access to those writing the compiler. It may be
> that things have changed and that another approach is superior now, as your analysis
> of std::tr1::function in MSVC 9 SP1 suggests.

I'm very surprised to hear that... perhaps you used the default MSVC++
settings which IIRC don't include RTTI?

Dave Abrahams           Meet me at BoostCon:
BoostPro Computing

Boost list run by bdawes at, gregod at, cpdaniel at, john at