template<typename ReturnType, typename T, typename... ParameterTypes>
void Proxy::AddMethod(std::string methodName,
ReturnType(T::*method)(ParameterTypes...) const, T& instance)
{
m_dispatcher->AddMethod(std::move(methodName), method, instance);
}
dGVtcGxhdGU8dHlwZW5hbWUgUmV0dXJuVHlwZSwgdHlwZW5hbWUgVCwgdHlwZW5hbWUuLi4gUGFyYW1ldGVyVHlwZXM+CnZvaWQgUHJveHk6OkFkZE1ldGhvZChzdGQ6OnN0cmluZyBtZXRob2ROYW1lLAogICAgUmV0dXJuVHlwZShUOjoqbWV0aG9kKShQYXJhbWV0ZXJUeXBlcy4uLikgY29uc3QsIFQmIGluc3RhbmNlKQp7CiAgICBtX2Rpc3BhdGNoZXItPkFkZE1ldGhvZChzdGQ6Om1vdmUobWV0aG9kTmFtZSksIG1ldGhvZCwgaW5zdGFuY2UpOwp9
prog.cpp:2:6: error: ‘Proxy’ has not been declared
void Proxy::AddMethod(std::string methodName,
^~~~~
prog.cpp:2:28: error: variable or field ‘AddMethod’ declared void
void Proxy::AddMethod(std::string methodName,
^~~~~~
prog.cpp:2:23: error: ‘string’ is not a member of ‘std’
void Proxy::AddMethod(std::string methodName,
^~~
prog.cpp:3:15: error: expected primary-expression before ‘(’ token
ReturnType(T::*method)(ParameterTypes...) const, T& instance)
^
prog.cpp:3:19: error: expected unqualified-id before ‘*’ token
ReturnType(T::*method)(ParameterTypes...) const, T& instance)
^
prog.cpp:3:20: error: ‘method’ was not declared in this scope
ReturnType(T::*method)(ParameterTypes...) const, T& instance)
^~~~~~
prog.cpp:3:42: error: expected primary-expression before ‘...’ token
ReturnType(T::*method)(ParameterTypes...) const, T& instance)
^~~
prog.cpp:3:55: error: expected primary-expression before ‘&’ token
ReturnType(T::*method)(ParameterTypes...) const, T& instance)
^
prog.cpp:3:57: error: ‘instance’ was not declared in this scope
ReturnType(T::*method)(ParameterTypes...) const, T& instance)
^~~~~~~~