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++/11323] New: Template parsing error


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11323

           Summary: Template parsing error
           Product: gcc
           Version: 3.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mleone at pixar dot com
                CC: gcc-bugs at gcc dot gnu dot org

The following is not accepted by g++ 3.2.2, but should be (it's accepted by KCC
and icc).

    struct Foo {
        template<typename T>
        void foo() { }
    };
    
    template<typename T>
    bool bar(Foo x) {
        x.foo<T>();
    }

This gives the following error in g++ 3.2.2 (and also in 2.9.6):

test.cpp: In function `bool bar(Foo)':
/home/mleone/tools-work/src/grail/lib/gsl/test.cpp:8: parse error before `>' token


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