Allocation Target of std::aligned_storage (stack or heap?)

Posted by Zenikoder on Stack Overflow See other posts from Stack Overflow or by Zenikoder
Published on 2010-12-29T08:16:31Z Indexed on 2010/12/29 8:54 UTC
Read the original article Hit count: 181

Filed under:
|
|
|
|

I've been trying to get my head around the TR1 addition known as aligned_storage. Whilst reading the following documents N2165, N3190 and N2140 I can't for the life of me see a statement where it clearly describes stack or heap nature of the memory being used.

I've had a look at the implementation provided by msvc2010, boost and gcc they all provide a stack based solution centered around the use of a union.

In short:

  • Is the memory type (stack or heap) used by aligned_storage implementation defined or is it always meant to be stack based?

  • and, What the is the specific document that defines/determines that?

© Stack Overflow or respective owner

Related posts about c++

Related posts about c++0x