Boost logo

Boost :

From: Andreas Scherer (as_at_[hidden])
Date: 2000-12-06 02:24:57

> Can anyone suggest a workaround or explain to me what am I doing
> wrong?

As I currently have only MSVC6sp3 (for which the code works fine),
let me suggest the following:

(a) If you have exactly one item of type T1 and one item of type T2
    use "standalone" boost::shared_ptr instead of the array notation.

(b) If you (and that's what I think you really want to do) put
    more than one item of the respective types in C arrays (of all
    forms of containers), then you should consider using

       boost::shared_array< T1 > sp1_( new T1 [ 42 ] );
       boost::shared_array< T2 > sp2_( new T2 [ 42 ] );

(and replace "42" by whatever amount of elements you need). We use
boost::shared_array<T> extensively in our production code and no
old-style C arrays anymore.


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