Bug 37141 - syntax error when using type inherited from base class
syntax error when using type inherited from base class
Status: RESOLVED DUPLICATE of bug 14258
Product: gcc
Classification: Unclassified
Component: c++
4.4.0
: P3 normal
: ---
Assigned To: Not yet assigned to anyone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-16 16:44 UTC by João Eiras
Modified: 2008-08-16 20:03 UTC (History)
12 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description João Eiras 2008-08-16 16:44:28 UTC
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;
}
Comment 1 Andrew Pinski 2008-08-16 20:03:02 UTC

*** This bug has been marked as a duplicate of 14258 ***