1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 372587: Testcase.

This commit is contained in:
Markus Schorn 2012-09-13 16:39:12 +02:00 committed by Sergey Prigogin
parent 33e98cd876
commit 5f6822ec53

View file

@ -6008,4 +6008,27 @@ public class AST2TemplateTests extends AST2BaseTest {
public void testIsPOD_367993() throws Exception { public void testIsPOD_367993() throws Exception {
parseAndCheckBindings(getAboveComment(), CPP, true); parseAndCheckBindings(getAboveComment(), CPP, true);
} }
// template<typename T, void (T::*M)()> class A {
// public:
// static void Delegate(void* thiz) { ((T*)thiz->*M)(); }
// };
// class B {
// public:
// void Method() {}
// };
// class C {
// public:
// template<typename T, void (T::*M)()>
// void callDelegate(A<T, M>& thiz) { A<T, M>::Delegate(&thiz); }
// };
// void Run() {
// C c;
// B b;
// A<B, &B::Method> a; /* no error this line */
// c.callDelegate(a); /* Invalid arguments 'Candidates are: void callDelegate(A<#0,#1> &)' */
// }
public void testDeductionOfNonTypeTemplateArg_372587() throws Exception {
parseAndCheckBindings(getAboveComment(), CPP, true);
}
} }