| Summary: | Parser fails to disambiguate template specializations differing by a const | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Nathan Ridge <zeratul976> |
| 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.1.0 | ||
| Target Milestone: | 8.1.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Thanks, added testcase and fix. |
In the following code: template <typename> class A; template <typename T> class A<void (T::*)()> { }; template <typename T> class A<void (T::*)() const> { }; struct S {}; int main() { A<void (S::*)()> m; // ERROR HERE: "'A<void (S::*)()>' is ambiguous" } GCC compiles the code fine and chooses the non-const specialization.