c++/7724: template descendant does not see typedefs of tmpl. ancestor
zyzstar@uid0.sk
zyzstar@uid0.sk
Mon Aug 26 06:56:00 GMT 2002
>Number: 7724
>Category: c++
>Synopsis: template descendant does not see typedefs of tmpl. ancestor
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Mon Aug 26 06:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: zyzstar@uid0.sk
>Release: g++-3.1.1
>Organization:
>Environment:
>Description:
template <typename T_>
class A
{
public:
typedef T_ arg_type;
A(arg_type i) : mi(i) {}
~A() {}
private:
arg_type mi;
};
template <typename T_>
class B : public A<T_>
{
public:
// typedef typename A<T_>::arg_type arg_type;
B(arg_type i) : A<T_>(i) {}
~B() {}
};
int main()
{
B<double> b(1);
return 0;
}
In g++-3.1.1 I have to uncomment the typedef in
the B class.
This is a problem only if B is a template class.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list