mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-03 05:33:33 +02:00
Bug 512932 - Delegating constructor in class template partial specialization
Change-Id: Id4cb38d4857af7335a4aa294a6fe149e1a4f2acd
This commit is contained in:
parent
cfdb9c2ad8
commit
e263da241e
2 changed files with 13 additions and 2 deletions
|
@ -10193,4 +10193,16 @@ public class AST2TemplateTests extends AST2TestBase {
|
||||||
public void testDependentSizeofInDefaultArgument_513430() throws Exception {
|
public void testDependentSizeofInDefaultArgument_513430() throws Exception {
|
||||||
parseAndCheckBindings();
|
parseAndCheckBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// template <typename>
|
||||||
|
// struct A;
|
||||||
|
//
|
||||||
|
// template <typename T>
|
||||||
|
// struct A<T*> {
|
||||||
|
// A(int);
|
||||||
|
// A() : A(5) {}
|
||||||
|
// };
|
||||||
|
public void testDelegatingConstructorInPartialSpecialization_512932() throws Exception {
|
||||||
|
parseAndCheckBindings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -404,8 +404,7 @@ public class CPPSemantics {
|
||||||
&& !(binding instanceof ICPPTemplateParameter)
|
&& !(binding instanceof ICPPTemplateParameter)
|
||||||
&& !(lookupName instanceof ICPPASTTemplateId)) {
|
&& !(lookupName instanceof ICPPASTTemplateId)) {
|
||||||
ASTNodeProperty prop = lookupName.getPropertyInParent();
|
ASTNodeProperty prop = lookupName.getPropertyInParent();
|
||||||
if (prop != ICPPASTConstructorChainInitializer.MEMBER_ID &&
|
if (prop != ICPPASTTemplateId.TEMPLATE_NAME && !lookupName.isQualified()) {
|
||||||
prop != ICPPASTTemplateId.TEMPLATE_NAME && !lookupName.isQualified()) {
|
|
||||||
// You cannot use a class template name outside of the class template scope,
|
// You cannot use a class template name outside of the class template scope,
|
||||||
// mark it as a problem.
|
// mark it as a problem.
|
||||||
IBinding user= CPPTemplates.isUsedInClassTemplateScope((ICPPClassTemplate) binding, lookupName);
|
IBinding user= CPPTemplates.isUsedInClassTemplateScope((ICPPClassTemplate) binding, lookupName);
|
||||||
|
|
Loading…
Add table
Reference in a new issue