mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42: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:
parent
6d3ca105fc
commit
3d44e89bee
2 changed files with 19 additions and 1 deletions
|
@ -7792,6 +7792,19 @@ public class AST2TemplateTests extends AST2TestBase {
|
|||
public void testPartialSpecializationForVarargFunctionType_402807() throws Exception {
|
||||
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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue