This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: dependent names in templates
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Dima Sorkin <dima dot sorkin at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 20 Dec 2005 18:27:08 +0100
- Subject: Re: dependent names in templates
- References: <e40293600512200622w50d163b4id975e1cc5e07bf89@mail.gmail.com>
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