Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-09-09 06:49:49


From: <rwgk_at_[hidden]>
> However, what I am interested in is a vector with two pieces
> of member data:
> T data_[N];
> std::size_t size_; // default constructor: size_ = 0
> std::size_t size() const { return size_; }
> std::size_t capacity() const { return N; }

The C array will default-construct the elements. This is not compatible with
a std::vector. If you replace it with a char array, we're back to the
alignment problem.

--
Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk