title: Upgrading some code to build on VS2013 from VS2008 "error C3865: '__thiscall' : can only be used on native member"
body: <p>I have some code which "works" in VS2008 in that it will build and run and do what I expect. However I have a build error in VS2013, I've managed to reproduce it with just this code:</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;Windows.h&gt;
  #include &lt;vector&gt;
  
  template &lt; class T &gt;
  class SignatureScanner
  {
  public:
      SignatureScanner(const BYTE* aPattern, const char* aMask, int aExpectedMatches = 1, int aOffSetToFuncStart = 0)
      {
      }
  
      const std::vector&lt;T&gt; Funcs() const
      {
          return iFuncs;
      }
  private:
      std::vector&lt;T&gt; iFuncs;
  };
  
  // Workaround/hack to define a thiscall function
  static void __fastcall fake_this_call_func(void *thisPtr, void* not_used_hack, int aParam)
  {
      printf("this [%x] param [%d]\n", thisPtr, aParam);
  }
  
  // type_traits(396): error C3865: '__thiscall' : can only be used on native member functions
  int _tmain(int argc, _TCHAR* argv[])
  {
      typedef void(__thiscall* myFuncPtr)(int thisPtr, int aParam);
  
      // I use this in some hook code to find a function and redirect it to fake_this_call_func
      // which works when it builds
      SignatureScanner&lt; myFuncPtr &gt; p(0, 0);
  
      return 0;
  }
  </code></pre>
  
  <p>I want to know why did 2008 not have an error when 2013 does, and how should I go about resolving this error? It only needs to build for Windows XP 32-bit - so platform specific hacks are OK.</p>