"Philippe A. Bouchard" <[EMAIL PROTECTED]> writes:
> Yes, exactly. Sorry if I wasn't precise enough.
>
> The bool type will cancel type_with_alignment<> effects (at least on Intel
> compatible platforms); i.e. unique alignment of each optional<T> type.
Sounds like you want
type_with_alignment<T>::type storage;
new ((void*)&storage) T(x, y, z)
Can you really do anything to make this cleaner? I guess:
aligned_storage<T> storage;
new (storage.bytes) T(x, y, z);
might be a help. What else are you gaining? And how do you destroy
the T? If not explicitly and you don't have a "constructed" flag,
you're going to have exception-safety problems.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost