Possible Duplicate:
What legitimate reasons exist to overload the unary operator& ?
I just read this question, and I can't help but wonder:
Why would anyone possibly want to overload the &
("address-of") operator?
SomeClass* operator&() const {
return address_of_object;
}
Is there any legitimate use case?