title: Stripping the class from a methodtype obtained via decltype
body: <p>I want to strip a class from a method type so that I have a function type left to work with.</p>
  
  <p><code>stripClass</code> has faked behavior that shows how I what I want as a result from the call <code>stripClass(decltype(&amp;A::B))</code>.</p>
  
  <p>The other lines show my general understanding.</p>
  
  <pre><code>#include &lt;functional&gt;
  #include &lt;iostream&gt;
  
  #define stripClass(type) void() //fake implementation of what I want to happen
  
  struct A
  {
      void B() {}
  };
  
  int main()
  {
      decltype(&amp;A::B) declTypeB = &amp;A::B; //decltype of method
      void (A::* decl)() = &amp;A::B; //explicit type of method
  
      void(*f)(); //function pointer thype when class type would be stripped from it
      std::function&lt;void()&gt; fromFunction = f;
  
      std::function&lt;stripClass(decltype(&amp;A::B))&gt; fromDecltype = f;
      return int{ 0 };
  }
  </code></pre>
  
  <p>How can I strip the class from a method to get a function pointer while preserving the return type and the parameters.</p>