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