[Bug c++/13967] New: template template argument identifier lookup fails scoping rules
gianni at mariani dot ws
gcc-bugzilla@gcc.gnu.org
Sun Feb 1 23:34:00 GMT 2004
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
More information about the Gcc-bugs
mailing list