#include <iostream>
using namespace std;

struct Foo
{
	void Bar(int a)
	{
		cout<<"non-const "<<a<<endl;
	}
	void BarConst(int a) const
	{
		cout<<"const "<<a<<endl;
	}
};
struct CallMe
{
	template<class This, class F, class... Args>
	void Invoke(This *obj, F&& f, Args&&... args) const
	{
		// Do something need the Return, This, Args... types..
		(obj->*std::forward<F>(f))(std::forward<Args>(args)...);
	}
};
int main() {
	CallMe call;
	Foo f;
	call.Invoke(&f, &Foo::Bar, 1);
	call.Invoke(&f, &Foo::BarConst, 1);
	// your code goes here
	return 0;
}