You can allocate a std::vector which allocates aligned heap memory by defining your own allocator.
You can allocate a c-style array on the stack using declspec align.
But can you declare a tr1::array which guarantees that the element at index zero will be aligned?
You can allocate a std::vector which allocates aligned heap memory by defining your own
Share
tr1::array(andstd::arrayandboost::array) are POD, so the memory occupied by the contents is coincident with the memory of thearray. So, allocate thearrayhowever you need to, and construct it with placementnew.