如何在不创建类模板的情况下在非模板类中进行可变参数回调?
class Foo{
...
template <typename ...Args>
using Callback = std::function<void(Args...)>;
template <typename ...Args>
void registerCallback(Callback<Args...> cb)
{
mCallbacks.emplace_back(cb);
}
private:
std::vector<Callback<...>> mCallbacks;
};