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

Bug 402861 - Error involving pointer-to-member of template class

Change-Id: I418b5698757650f86000c31b8b7ea12e0192fcee
Reviewed-on: https://git.eclipse.org/r/11034
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-10 23:35:12 -04:00 committed by Sergey Prigogin
parent c8e936ae11
commit 0d2decffcf
2 changed files with 16 additions and 1 deletions

View file

@ -6212,6 +6212,21 @@ public class AST2TemplateTests extends AST2TestBase {
public void testPointerToMemberAsDependentExpression_391001() throws Exception { public void testPointerToMemberAsDependentExpression_391001() throws Exception {
parseAndCheckBindings(getAboveComment(), CPP, true); parseAndCheckBindings(getAboveComment(), CPP, true);
} }
// template<typename>
// struct A {
// char x;
// };
//
// typedef A<int> B;
//
// template <char B::*PtrToMember>
// struct C {};
//
// typedef C<&B::x> T;
public void testPointerToMemberOfTemplateClass_402861() throws Exception {
parseAndCheckBindings();
}
// class Memory { }; // class Memory { };
// Memory memory; // Memory memory;

View file

@ -44,7 +44,7 @@ public class CPPFieldSpecialization extends CPPSpecialization implements ICPPFie
@Override @Override
public ICPPClassType getClassOwner() { public ICPPClassType getClassOwner() {
return getField().getClassOwner(); return (ICPPClassType) getOwner();
} }
@Override @Override