このようなことを達成することは可能ですか?
template<typename Signature>
class Test
{
public:
//here I want operator () to respect the signature
};
Test<void(int)> t1; //void operator()(int)
Test<void(int, float)> t2; //void operator()(int, float)
戻りタイプは常にvoid
です。
テンプレートパラメータとして関数シグネチャを送信したいと思います。これは可能ですか?私のコンパイラはまだこの機能をサポートしていないため、可変個引数テンプレートを使用できません。