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:
parent
33e98cd876
commit
5f6822ec53
1 changed files with 23 additions and 0 deletions
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue