Marcel Wiesweg wrote:
There are Situations where the compiler has little or no chance to find out what you're trying to use (its hard in case you use template specialisation).I have to admit that I don't quite understand where the problem is here. Why doesn't T *l = (T *)First(); work any more? After all, there is no other item named "First" anywhere near. What am I missing?
The changes are explained at http://gcc.gnu.org/gcc-3.4/changes.html
section "C++".
If I understand that correctly in a situation like
template <class T > class Parent {
public: int f();
};
...
int f();
...
template <class T > class MyClass : public Parent {
void xy() { f(); }
}
in xy() the global function f will be called.
_Why_ this is done we will probably have to ask some g++ developer or Mr. Stroustrup himself.