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
Since posting, turns I get what I want swapping the IDE setting from the default to..
LLVM compiler 3.0 Language:
LLVM C++ standard library:
=libc++ (LLVM standard library with c++0x support.)
( CLANG_CXX_LIBRARY = libc++ )l
Previously the setting was "libstdc++ (gcc c++ standard library)" which appears to have the padding, and that allowed me to include
instead of
;
and now
sizeof(array)==sizeof(T)*N
this is all in Xcode 4.2 on mac osx lion. I'm hoping one is simply deprecated and that this behavior is what i'll get on other platforms?