view gcc/testsuite/g++.dg/template/access25.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/56359

typedef int (*InvocationCallback) (const int &);

template < typename target_t >
void SetPrototypeMethod (target_t, const char *, InvocationCallback);

class A
{
    void Initialize ();
protected:
    static int Stop (const int &);
    void Stop ();  // comment out to make the bug disappear.
};

void
A::Initialize ()
{
    SetPrototypeMethod (0, "stop", A::Stop);
}