But there are source code editors which can recognize reloaded operator-> and show correct code completion (borland c++ builder for example). I thing it is possible to make C::B code completion more smarter.
Code completion has a lot more issues than just that. Feel free to contribute a better code completion engine.
Seriously, the development team would forever be in your debt.
As pointed out by aurisc4, the Borland C++ Builder solution (as the Microsoft one, too) uses the compiler for such tasks, and clearly, this is superior. However, the downside is that those programs only work with exactly one revision of one specific compiler (their own).
We don't have the luxury of being able to load gcc (or whatever compiler the user configures) as a DLL either, nor are there any provisions (to my knowledge) to offer the parse tree to another application.
At the very best, gcc can be asked to run a file through the preprocessor (substituting
#include and
#define, and evaluating
#if), but again, this is a feature of one particular compiler, there's no guarantee that another compiler will work the same.