title: Using std::placeholders in variadic templates
body: <p>I am having difficulty using <code>std::placeholders</code> in my function that takes a variadic template. I am starting to think I don't need to use a variadic template, but I've been trying this for so long I'm thinking in the weeds and need someone with a fresh look.</p>
  
  <p>The following templated function takes a regular templated argument and then a variadic argument. It is causing a compiler error:</p>
  
  <pre><code>registerEvent&lt;UpdaterComponent, std::_Ph&lt;1&gt;&gt;(EVT_INIT, &amp;UpdaterComponent::initialise, std::placeholders::_1); 
  </code></pre>
  
  <p>Compiler error:</p>
  
  <blockquote>
    <p>Error 1   error C2664: 'Status Component::registerEvent>(const int &amp;,Status UpdaterComponent::* (__cdecl <em>)(const EventArgs &amp;),std::_Ph&lt;1>)' : cannot convert argument 2 from 'Status (__thiscall UpdaterComponent::</em> )(const EventArgs &amp;)' to 'Status UpdaterComponent::* (__cdecl *)(const EventArgs &amp;)'   </p>
  </blockquote>
  
  <p>What exactly is going wrong here and how I can fix this compiler error?</p>
  
  <pre><code>// In class Component
  template&lt;typename T, typename... Params&gt;
  Status registerEvent(int evtId, Status T::*func(const EventArgs&amp; evtArgs), Params...)
  {
      ... irrelevant code removed for brevity
  
      auto res = std::bind(func, this, Params...);
  
      ... irrelevant code removed for brevity
  }
  
  
  // Usage
  class UpdaterComponent : public Component
  {
  public:
      UpdaterComponent()
      {
          registerEvent&lt;UpdaterComponent, std::_Ph&lt;1&gt;&gt;(EVT_INIT, &amp;UpdaterComponent::initialise, std::placeholders::_1);
      }
  };
  </code></pre>