This is the mail archive of the gcc-bugs@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]

c++/8622: typename of base class


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


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