Why does the if condition in the following code yield true?
struct A
{
int firstMember;
} a1;
if (&a1 == static_cast<void*>(&a1.firstMember)) std::cout << "equal";
I got a bit confused when reading Stroustrup's FAQ on empty classes, specifically the statement below:
if (p1 == p2) cout << "nice: good optimizer";