https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65878

            Bug ID: 65878
           Summary: parse error in template argument list
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xyshh94225 at hotmail dot com

The following code triggers 'parse error in template argument list' on my
computer:

1.cpp:
-----------------------------------
template<typename T>
struct A{ 
    int B; 
};
template<typename T>
void B(){
}
template<typename T> 
void C(){
    A<T> x;
    x.B < 2;
}
int main() {
    return 0;
}
---------------------------------
$ g++-4.9 1.cpp -o 1              
1.cpp: In function 'bool C()':
1.cpp:10:4: error: parse error in template argument list
  x.B < 2;
    ^

This is specific to operator  "<".

Reply via email to