This is the mail archive of the gcc@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: implicit typename deprecated, "see documentation"


On Jun 11, 2003, Paul Koning <pkoning@equallogic.com> wrote:

> filename.hh:556: warning: implicit typename is deprecated, please see the documentation for details

> Ok, so what does this mean?

It means your program is not written in ISO C++, and GCC is moving
towards enforcing a rule that it used to be more lenient about.

> And what documentation am I supposed to refer to for details?

The ISO C++ Standard.

The rule is that, if a qualified name is template-dependent, it must
be preceded by the `typename' keyword.

template <typename T>
class foo {
  T x; // unqualified, but T is known to be a typename, so ok
  T::bar y; // ill-formed, qualified template-dependent not preceded
            // by typename must be assumed to not be a type name
  typename T::bar z; // ok, as long as T::bar turns out to be a type
};

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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