
on Thu Oct 29 2009, "Stewart, Robert" <Robert.Stewart-AT-sig.com> 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: http://www.boostcon.com BoostPro Computing http://www.boostpro.com