Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357308 - False "Semantic Error" on template template default arguments
Summary: False "Semantic Error" on template template default arguments
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.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:
: 357404 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-10 11:49 EDT by Artem Pelenitsyn CLA
Modified: 2012-02-27 22:40 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Artem Pelenitsyn CLA 2011-09-10 11:49:13 EDT
The problem is in perfectly valid C++ code as follows.

template<typename T> struct SS {};

template<
    template<typename T, typename S = SS<T> > class Cont> // "Type T could not be resolved." — on second occurence of T. Type: Semantic Error.
Cont<int>
f() {}
Comment 1 Markus Schorn CLA 2011-09-15 10:43:04 EDT
Thanks for the example, added testcase and fix.
Comment 2 Artem Pelenitsyn CLA 2011-09-15 11:19:10 EDT
(In reply to comment #1)
> Thanks for the example, added testcase and fix.

Sorry for silly question: where can I see the fix and when will it be possible to get it on my computer (through update or anyhow…)?
Comment 3 CDT Genie CLA 2011-09-15 11:23:02 EDT
*** cdt git genie on behalf of Markus Schorn ***

    Bug 357308: Resolving references to parameters of template-template paramters.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=053b4c32c5291512e8d2f0ac7afcb0d94107b8d2
Comment 4 Markus Schorn CLA 2011-09-15 11:36:36 EDT
*** Bug 357404 has been marked as a duplicate of this bug. ***
Comment 5 Markus Schorn CLA 2011-09-15 11:42:06 EDT
(In reply to comment #2)
> Sorry for silly question: where can I see the fix and when will it be possible
> to get it on my computer (through update or anyhow…)?
You can wait for the next release or pick up one of the nightly builds:
https://hudson.eclipse.org/hudson/job/cdt-nightly/