1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Bug 402807 - Partial specialization for vararg function type

Change-Id: I2fa7bdede392a5b51da065d1d6196b10f2a52d6a
Reviewed-on: https://git.eclipse.org/r/11025
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This commit is contained in:
Nathan Ridge 2013-03-09 22:44:23 -05:00 committed by Sergey Prigogin
parent aed09ee4b8
commit 072b8512ea
2 changed files with 14 additions and 1 deletions

View file

@ -7195,6 +7195,19 @@ public class AST2TemplateTests extends AST2TestBase {
parseAndCheckBindings();
}
// template <typename T>
// struct waldo {
// typedef int type;
// };
//
// template <typename R>
// struct waldo<R (...)>;
//
// typedef waldo<int ()>::type Type;
public void testPartialSpecializationForVarargFunctionType_402807() throws Exception {
parseAndCheckBindings();
}
// template <typename>
// struct meta {
// static const bool value = 1;

View file

@ -922,7 +922,7 @@ public class TemplateArgumentDeduction {
private boolean fromFunctionType(ICPPFunctionType ftp, ICPPFunctionType fta, IASTNode point)
throws DOMException {
if (ftp.isConst() != fta.isConst() || ftp.isVolatile() != fta.isVolatile())
if (ftp.isConst() != fta.isConst() || ftp.isVolatile() != fta.isVolatile() || ftp.takesVarArgs() != fta.takesVarArgs())
return false;
if (!fromType(ftp.getReturnType(), fta.getReturnType(), false, point))