mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Scope for deferred instances, bug 289132.
This commit is contained in:
parent
bf4a4149cf
commit
1754ae59b2
2 changed files with 24 additions and 5 deletions
|
@ -4149,4 +4149,22 @@ public class AST2TemplateTests extends AST2BaseTest {
|
||||||
ICPPFunction func= bh.assertNonProblem("f(x)", 1, ICPPFunction.class);
|
ICPPFunction func= bh.assertNonProblem("f(x)", 1, ICPPFunction.class);
|
||||||
assertFalse(func instanceof ICPPUnknownBinding);
|
assertFalse(func instanceof ICPPUnknownBinding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// class NullType {};
|
||||||
|
// template <typename T, typename U> struct TypeList {
|
||||||
|
// typedef T Head;
|
||||||
|
// typedef U Tail;
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// template <typename T1 = NullType, typename T2 = NullType> struct CreateTL {
|
||||||
|
// typedef TypeList<T1, typename CreateTL<T2>::Type> Type;
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// template<> struct CreateTL<NullType, NullType> {
|
||||||
|
// typedef NullType Type;
|
||||||
|
// };
|
||||||
|
public void testDefaultArgument_289132() throws Exception {
|
||||||
|
final String code= getAboveComment();
|
||||||
|
parseAndCheckBindings(code, ParserLanguage.CPP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1311,11 +1311,12 @@ public class CPPTemplates {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean areSameArguments(ICPPTemplateArgument[] args, ICPPTemplateArgument[] specArgs) {
|
public static boolean areSameArguments(ICPPTemplateArgument[] args, ICPPTemplateArgument[] specArgs) {
|
||||||
if (args.length == specArgs.length) {
|
if (args.length != specArgs.length) {
|
||||||
for (int i=0; i < args.length; i++) {
|
return false;
|
||||||
if (!specArgs[i].isSameValue(args[i]))
|
}
|
||||||
return false;
|
for (int i=0; i < args.length; i++) {
|
||||||
}
|
if (!specArgs[i].isSameValue(args[i]))
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue