3 ms·
C++ can do something something like this (at compile time) in its -> operator (ancient feature, long before C++98 was standardized). obj->foo() will expand
by kazinator 5y ago
C++ can do something something like this (at compile time) in its -> operator (ancient feature, long before C++98 was standardized).
obj->foo()
will expand into enough -> dereferences until a foo is found. For instance suppose the object returned by obj's operator ->() function doesn't have a foo member, but itself overloads ->. Then that overload will be used, and so on.
- deleted 5y ago[deleted]