gcc/testsuite/g++.dg/template/access25.C
raw| 1 | // PR c++/56359 |
| 2 | |
| 3 | typedef int (*InvocationCallback) (const int &); |
| 4 | |
| 5 | template < typename target_t > |
| 6 | void SetPrototypeMethod (target_t, const char *, InvocationCallback); |
| 7 | |
| 8 | class A |
| 9 | { |
| 10 | void Initialize (); |
| 11 | protected: |
| 12 | static int Stop (const int &); |
| 13 | void Stop (); // comment out to make the bug disappear. |
| 14 | }; |
| 15 | |
| 16 | void |
| 17 | A::Initialize () |
| 18 | { |
| 19 | SetPrototypeMethod (0, "stop", A::Stop); |
| 20 | } |