Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367997 - Error with partial template specialization and default template parameters
Summary: Error with partial template specialization and default template parameters
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.1.0   Edit
Assignee: Markus Schorn CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-05 19:36 EST by Nathan Ridge CLA
Modified: 2012-02-29 13:21 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Ridge CLA 2012-01-05 19:36:14 EST
In the following code:

template <typename>
class A {};

template <typename, typename = void>
struct B {};

template <typename T>
struct B<A<T>>
{
    typedef int type;
};
    
int main()
{
    typedef B<A<int>>::type type;  // ERROR HERE
}

CDT gives an error at the indicated line: "Type 'B<A<int>>::type' could not be resolved".

GCC compiles the code fine.
Comment 1 Markus Schorn CLA 2012-01-09 05:54:32 EST
Thanks, added testcase and fix.
Comment 2 CDT Genie CLA 2012-02-29 13:21:08 EST
*** cdt git genie on behalf of Markus Schorn ***

    Bug 367997: Partial class template specialization using default arguments.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=99fa95b7cd235239f10db99593c458d6ee354144