std::array alignment
Trying out std::tr1::array on a mac i'm getting 16 byte alignment. sizeof(int) = 4; sizeof( std::tr1::array< int,3 > ) = 16; sizeof( std::tr1::array< int,4 > ) = 16; sizeof( std::tr1::array< int,5 > ) = 32; Is there anything in the STL that behaves like array< T,N > but is guaranteed to NOT pad itself out, i.e. sizeof( ARRAY< T, N> ) = sizeof( T )*N The standard mandates that the elements "are stored contiguously, meaning that if a is an array, then it obeys the identity &a[n] == &a[0] + n for all 0 <= n < N." (23.3.2.1 [array.overview] paragraph 1) As far as I know, there is no guarantee that