This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13967] New: template template argument identifier lookup fails scoping rules


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]