Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-04-23 17:41:25


"Peter Dimov" <pdimov_at_[hidden]> writes:

> boost::aligned_storage is supposed to be an implementation of TR1
> aligned_storage, which yields a POD. I even see a specialization of is_pod
> for aligned_storage in the header. However the class itself (::type only
> echoes its type back) does not seem a POD at all. It has a default
> constructor, destructor, a private copy constructor and whatnot.
> aligned_storage_test does not test its PODness, it only looks at is_pod.

Wow, that is embarassing!

> I think that a reasonable test for PODness would be to try to initialize
> with = {} (if nonscalar) and/or use it in a union.

Good idea. Who is responsible for this code?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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