If there is a POD structure, with some member variables, for example like this:
struct foo
{
short a;
int b;
char c[50];
// ...
};
C++-0x allows you to do this:
std::cout << sizeof( foo::a ) << std::endl;
std::cout << sizeof( foo::b ) << std::endl;
std::cout << sizeof( foo::c ) << std::endl;
C++-0x allows sizeof to work on members of classes without an explicit object.
The paper is here: Extending sizeof to apply to non-static data members without an object (revision 1)
I saw the post about this above too late. Sorry.