mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
Bug 530086 - Consider pack expansions when matching non-type arguments to parameters during instantiation
Alias templates can be instantiated with dependent arguments. Change-Id: I123ee574ed2eecb09b551360a0bbc966893d9e34
This commit is contained in:
parent
ee784263c2
commit
5f9964098c
2 changed files with 12 additions and 0 deletions
|
@ -10551,4 +10551,13 @@ public class AST2TemplateTests extends AST2CPPTestBase {
|
|||
public void testTemplateIdAmbiguity_529696() throws Exception {
|
||||
parseAndCheckBindings();
|
||||
}
|
||||
|
||||
// template <int...>
|
||||
// using index_sequence = int;
|
||||
//
|
||||
// template <int... I>
|
||||
// void foo(index_sequence<I...>);
|
||||
public void testTemplateAliasWithVariadicNonTypeArgs_530086() throws Exception {
|
||||
parseAndCheckBindings();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2834,6 +2834,9 @@ public class CPPTemplates {
|
|||
final IType paramType, ICPPTemplateArgument arg) throws DOMException {
|
||||
// 14.1s8 function to pointer and array to pointer conversions.
|
||||
IType a= arg.getTypeOfNonTypeValue();
|
||||
if (a instanceof ICPPParameterPackType) {
|
||||
a = ((ICPPParameterPackType) a).getType();
|
||||
}
|
||||
IType p;
|
||||
if (paramType instanceof IFunctionType) {
|
||||
p = new CPPPointerType(paramType);
|
||||
|
|
Loading…
Add table
Reference in a new issue