title: Passing member function of templated class to a templated function
body: <p>I want to pass a member function of a class to a function in which I bind the function to an object that I have created. I succeeded to do this with a macro but I want to see how/if it could be done with an actual function(since I have heard macros are to be avoided when possible).
  Here's my macro:</p>
  
  <pre><code>#define addCommand(string, function) commands_[string] = std::bind(&amp;function, game_);
  </code></pre>
  
  <p>Here's how I tried to do it with a function but it doesn't work:</p>
  
  <pre><code>template&lt;typename Game&gt;
  void addCommand(std::string command, void (Game::*function)())
  {
      commands_[string] = std::bind(&amp;Game::function, game_);
  }
  </code></pre>