1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Bug 485888 - Partial specialization for ref-qualified function type

Change-Id: I34bb2faa8ce701b905c8692d32ff1e5514477d6f
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
This commit is contained in:
Nathan Ridge 2016-01-15 02:20:56 -05:00 committed by Gerrit Code Review @ Eclipse.org
parent 6d3ca105fc
commit 3d44e89bee
2 changed files with 19 additions and 1 deletions

View file

@ -7793,6 +7793,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 testPartialSpecializationForRefQualifiedFunctionType_485888() throws Exception {
parseAndCheckBindings();
}
// template <typename>
// struct meta {
// static const bool value = 1;

View file

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