18/06/25 00:15:08.68 RQXh1ivn.net
void func1(int a) { printf("%d\n", a); }
void func2(int a, int b) { printf("%d,%d\n", a, b);}
template<?????>
class Test
{
public:
void method(void) { (templateの引数で func1(int a) か func2(int a, in b)を呼ぶ) }
private:
int a;
in b;
};
のような事をしたいのですが、引数が1つか2つの関数をそれぞれ名前でtemplate引数にして
記述したいのですが、うまくいきません。どうすれば良いでしょうか?
例えば template < void F(int)> とすると Test<func1>() でいけるのですが、func2の場合が
表現出来ません。