I was wandering through the code of Sequitur G2P and found a really strange line of code:
public: ... const Node *childrenEnd() const { return (this+1)->finalized.firstChild_; }
I know that this is a pointer to the current object, and since it is a pointer, the operation is perfectly legal, but what does this+1 actually refer to?
this
this+1
Presumably this is part of an array, so this+1 would refer to the next object in that array.
2.1m questions
2.1m answers
60 comments
57.0k users