J
JKop
You can overload the address-of operator. Consider a simple class:
class Blah
{
public:
Blah* operator&()
{
return this;
}
};
Now... consider if "this" was a reference (as before I've argued it should
be):
class Blah
{
public:
Blah* operator&()
{
return &this;
}
};
looks like an infinite loop to me...
Although to be honest I would've prefered "p_this".
-JKop
class Blah
{
public:
Blah* operator&()
{
return this;
}
};
Now... consider if "this" was a reference (as before I've argued it should
be):
class Blah
{
public:
Blah* operator&()
{
return &this;
}
};
looks like an infinite loop to me...
Although to be honest I would've prefered "p_this".
-JKop