Update ChangeLog and version files for release
[official-gcc.git] / gcc / testsuite / g++.dg / template / ptrmem23.C
blob28c0a63e58921f2eb88a00dde9762a828d4cbba4
1 // PR c++/56247
3 struct Base {
4     void method() {}
5 };
7 typedef void (Base::*MemPtr)();
9 // Template with a member function pointer "non-type parameter".
10 template<MemPtr func>
11 struct Wrapper {};
13 template<class C>
14 struct Child : public Base {
15     // Templated derived class instantiates the Wrapper with the same parameter
16     // in two different virtual methods.
17     void foo() { typedef Wrapper<&Base::method> W; }
18     void bar() { typedef Wrapper<&Base::method> W; }
21 // Instantiate Child with some type.
22 template class Child<int>;