From: Robert Ramey (ramey_at_[hidden])
Date: 2004-03-05 10:59:31
Joaqu?n M? L?pez Mu?oz wrote:
>"serialization/collections_load_imp.hpp" defines a private template
>class stack_allocate for stack-based reservation of uninitialized
>memory. To the best of my knowledge, the way it does so
>is not std-conformant due to alignment issues.
>Fortunately, (undocumented) "boost/aligned_storage.hpp" provides
>a template class named aligned_storage which handles the issue,
>so I guess the problem can be solved by just using this
>facility instead of stack_allocate.
This has been mentioned before. I was unable to find any information other
than the code itself which wasn't all that transparent to me. And the stack
allocate was soooooo simple. Is aligned_storage part of boost? Is it
documented anywhere? Is it part of any test suite? Has it been tested for
portability? In general I would prefer a boostified component over a
homebrew one. I'm really not sure of what the status of aligned_storage is.
Also, the nameitself didn't make it clear to me that its intended purpose
was identical to that implemented by stack_allocate.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk