Robert #1 In languages like C++ sizeof is a compile-time operator, which is replaced with a literal value representing the size of the type. Whether the instance is valid or not doesn't make any difference.