Is the following code 100% portable?
int a=10; size_t size_of_int = (char *)(&a+1)-(char*)(&a); // No problem here? std::cout<
There was a debate on a similar question.
See the comments on my answer to that question for some pointers at why this is not only non-portable, but also is undefined behaviour by the standard.