c++/8622: typename of base class

laurent@ient.rwth-aachen.de laurent@ient.rwth-aachen.de
Mon Nov 18 08:55:00 GMT 2002


>Number:         8622
>Category:       c++
>Synopsis:       typename of base class
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 18 08:36:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     laurent@ient.rwth-aachen.de
>Release:        gcc3.2
>Organization:
>Environment:
cygwin, probably every other
>Description:
A type definition, defined by a template typename in a base class, is not understood in the derived class.
This work with Visual 7 or Intel Compiler 6, but gcc gives the following unjustified warnings:

warnings: 'typename B<V>::value_type' is implicitly a typename
warnings: implicit typename is deprecated, please see the documentation for details

Am I wrong ?
If it is really a bug, please correct it, because it is quite important for my big project.

Patrick
>How-To-Repeat:
template<class V>
struct value_traits
{
  typedef V value_type;
};


template<class V>
struct A
{
  typedef typename value_traits<V>::value_type value_type;
};

template<class V>
struct B : public A<V>
{
  value_type v;
};

int main()
{
  B<int> b;
  return 0;
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list