| Summary: | [c++] Ambiguity between template-id and binary expression | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Markus Schorn <mschorn.eclipse> | ||||
| Component: | cdt-parser | Assignee: | Markus Schorn <mschorn.eclipse> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | 8.0 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
There is an ambiguity between template-ids and binary expressions. The parser handles it via a heuristics. The following example is extracted from the gcc-header files: template<bool> struct S { static int m(); }; int f(); int s; void test() { S<1 && 2>::m(); // m is member of S s<1 && 2>::f(); // f is global }