dependent names in templates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.
  Consider the following case :
template<typename T> struct Base{
     void f() const {}
     int X;
};

template<typename T> struct Derived : public Base<T> {
     void g() {
         X = X+X;
         f();   // LINE*
     }
};

gcc does not require to write in "line*" : "this->f()", "this->X"
But there are compilers that do require, they cannot
resolve the symbol "f()" otherwise.

 I have a portable c++ code, besides this case.
Is there some automatic way to find and correct
all occurencies of such a case in the code?

I always work with gcc, but I will
need to port the code to vendor provided
compiler soon (to sgi mipspro).

Thank you.
 Dima.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux