?
=?ISO-8859-1?Q?Tanguy_Fautr=E9?=
Hi,
I was wondering whether you can always assume that
sizeof(foo) == sizeof(T) * Size;
for
template <class T, size_t Size>
class foo
{
T bar[Size];
};
considering that the foo class will never have any virtual functions.
Or is the compiler allowed to add padding or extra information, even in
that case?
Regards,
Tanguy
I was wondering whether you can always assume that
sizeof(foo) == sizeof(T) * Size;
for
template <class T, size_t Size>
class foo
{
T bar[Size];
};
considering that the foo class will never have any virtual functions.
Or is the compiler allowed to add padding or extra information, even in
that case?
Regards,
Tanguy