Boost logo

Boost :

From: Ed Brey (brey_at_[hidden])
Date: 2001-04-09 11:09:10

From: "David Abrahams" <abrahams_at_[hidden]>
> > Losing this equivalency is a shame, although I do like being able to
> > point to incomplete types and its subsequent reduction in header
> > dependency. If only there were a way to get the best of both
> > :-( As a side opinion, I definitely don't think it would be worth
> > giving up the equivalency just to detect
> > errors that most compilers warn about anyway.
> If you usually enable the warning, I think you're not losing anything
> terms of header dependency reduction. Do you commonly and consciously
> auto_ptr<X> where X has a trivial destructor?

Auto_ptr, no; however, a quick scan through my last major project shows
13 uses of boost::scoped_array, all pointing to a POD. In most cases,
another variable already had the size and I needed pass an array into a
COM function (OLE DB often uses parallel arrays instead of a single
array of structures). In a couple areas I used a scoped_array<BYTE>
when dealing with an opaque array of client data.

It would be a bad thing if the compiler generated a needless function
call for every element in the array (for a do-nothing destructor).

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