What are some legitimate and/or interesting uses for performing pointer-arithmetic on C++'s "this" pointer, if any?
Just to make SE pleased with the length of this question, I'll include some relevant code.
class Foo
{
Foo(void)
: _data(0)
{}
void Bar(void)
{
this->_data++;
this[1].Bar();
}
int _data;
};
Aucun commentaire:
Enregistrer un commentaire