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
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…