This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13967] New: template template argument identifier lookup fails scoping rules
- From: "gianni at mariani dot ws" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Feb 2004 23:34:03 -0000
- Subject: [Bug c++/13967] New: template template argument identifier lookup fails scoping rules
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The code below, compiles fine on MSVC++ 7.1 and Comeau.
It seems that the fix for Bug 13808 is not complete as the
scoping of template parameters is not taken into account
before identifies in the anclosing class's template.
gccbug_13808.cpp: In member function `C<T, A> X::Func()':
gccbug_13808.cpp:10: error: `X::C' is not a template
struct X
{
struct C { int x; }; //uncomment to make this work.
struct Z { int x; }; //uncomment to make this work.
template<typename T, typename A, template<typename,typename> class C>
C<T, A> Func()
{
return C<T, A>(); // sees X::C not template parameter
}
template< typename Z > Z Zunc()
{
return Z(); // works ok
}
};
--
Summary: template template argument identifier lookup fails
scoping rules
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gianni at mariani dot ws
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13967