mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 02:06: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:
parent
aed09ee4b8
commit
072b8512ea
2 changed files with 14 additions and 1 deletions
|
@ -7195,6 +7195,19 @@ public class AST2TemplateTests extends AST2TestBase {
|
||||||
parseAndCheckBindings();
|
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>
|
// template <typename>
|
||||||
// struct meta {
|
// struct meta {
|
||||||
// static const bool value = 1;
|
// static const bool value = 1;
|
||||||
|
|
|
@ -922,7 +922,7 @@ public class TemplateArgumentDeduction {
|
||||||
|
|
||||||
private boolean fromFunctionType(ICPPFunctionType ftp, ICPPFunctionType fta, IASTNode point)
|
private boolean fromFunctionType(ICPPFunctionType ftp, ICPPFunctionType fta, IASTNode point)
|
||||||
throws DOMException {
|
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;
|
return false;
|
||||||
|
|
||||||
if (!fromType(ftp.getReturnType(), fta.getReturnType(), false, point))
|
if (!fromType(ftp.getReturnType(), fta.getReturnType(), false, point))
|
||||||
|
|
Loading…
Add table
Reference in a new issue