Boost logo

Boost Users :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-09-20 03:33:20


Miles Bader skrev:
> I tried changing some of my code that used std::vector<foo *> to using
> boost::ptr_vector<foo> (to get automatic deallocation and the slightly
> nicer syntax), but the resulting compiled code seems oddly bloated
> compared to the original code using std::vector. My intuition is that
> the two should generally compile to largely equivalent object code,
> except where there's a necessary functional difference.

Are you referring to a debug build? If so, why do you care about it?
What compiler?

1.34 introduced a macro for tuning all the exceptions into asserts.

> Does it have a "bloat" reputation?

Well, there has been some indications that the void* implementation
leads to slightly slower code. OTOH, the void* implementation was made
exactly to avoid bloat on compilers that generate new code for every T*.

-Thorsten


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net