C++11関数があるとします。
template<class F, class... Args>
void g(F&& f, Args&&... args)
{
/* ... */
forward<F>(f)(forward<Args>(args)...);
/* ... */
}
そして私はクラスを持っていますX:
struct X
{
void h();
}
h特定のXインスタンスの呼び出しをxパラメーターとして渡す方法はありf, argsますgか?
X x = ...;
g(x.h); // WRONG