Given an expression e
of type T
, sizeof(e)
returns the size in bytes of T
. The
sizeof
operator results in a value of type size_t
. Also, sizeof(e)
has no side effects because e
is not evaluated. Therefore, sizeof(sizeof(e))
is equivalent to sizeof(size_t)
.
In other words, sizeof(sizeof(e))
always gives the same result and does not depend on e
, which is unlikely what was
expected.