This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37141] New: syntax error when using type inherited from base class
- From: "joao dot eiras at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Aug 2008 16:44:28 -0000
- Subject: [Bug c++/37141] New: syntax error when using type inherited from base class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code sample does not compile, and it should.
I get the error:
gpp_bug_1.cpp: In constructor `B<X>::B()':
gpp_bug_1.cpp:10: error: expected `;' before "x"
G++ version: g++ (GCC) 4.4.0 20080729 (experimental)
template<class X> class A{
public:
typedef X type_t;
};
template<class X> class B: A<X>{
public:
using typename A<X>::type_t;
B(){type_t x;}
};
int main_(int argc, char *argv[]){
return 1;
}
--
Summary: syntax error when using type inherited from base class
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: joao dot eiras at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37141