implicit typename deprecated, "see documentation"
Alexandre Oliva
aoliva@redhat.com
Wed Jun 11 18:21:00 GMT 2003
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
More information about the Gcc
mailing list