This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dependent names in templates


Dima Sorkin <dima.sorkin@gmail.com> writes:

| 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.

Which version of GCC?  See changes for GCC-3.4.x

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]