#include <iostream>
#include <string>
#include <functional>
using namespace std;
class TestBindVar
{
public:
template<typename... T>
void Init(T&... args)
{
cout << __FUNCTION__ << endl;
Print(args...);
// 方法1
{
mf_ = std::bind(&TestBindVar::Reset<T&...>, this, args...);
std::cout << __FUNCTION__ << "==> " << __LINE__ << std::endl;
mf_();
}
// 方法2
{
void (TestBindVar::*FuncPointer)(T&...) = &TestBindVar::Reset<T&...>;
mf_ = std::bind(FuncPointer, this, args...);
std::cout << __FUNCTION__ << "==> " << __LINE__ << std::endl;
mf_();
}
// 方法3
{
using FuncType = void(TestBindVar::*)(T&...);
mf