| Summary: | Syntax error when unnamed template parameter has default value | ||
|---|---|---|---|
| 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, malaperle |
| Version: | 8.0 | ||
| Target Milestone: | 8.0.1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
You are right, this is legal C++ code. Added testcase, fixed in 8.0.1 > 20110720. *** cdt git genie on behalf of 352266 ***
Bug 352266: Template paramter without name, but with default value
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=9840061bd608aaf9b5a14c38dbb7da8bca9bd097
*** cdt git genie on behalf of 352266 ***
Bug 352266: Template paramter without name, but with default value
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=1215f963145bf3cf9402316a91686b6243c16137
|
The parser marks the following code as a syntax error: template <typename = int> class A {}; The code compiles fine with GCC. I believe it is valid.