title: "Error: type name is not allowed" message in editor but not during compile
body: <p>I'm using MSVS2013 and I rolled my own <code>countof</code> macro that accepts only <code>TCHAR</code> arrays. For reference, here is the code:</p>
  
  <pre><code>// Helper struct for _tcountof() macro
  template &lt;typename T, size_t N&gt;
  struct _tcountof_struct_helper;
  
  // Helper partially specialized struct for _tcountof() macro
  template &lt;size_t N&gt;
  struct _tcountof_struct_helper&lt;TCHAR, N&gt;
  {
      static size_t const value = N;
  };
  
  // Helper function for _tcountof() macro.  It's never called so no body is required.
  template &lt;typename T, size_t N&gt;
  auto _tcountof_function_helper(T(&amp;)[N])-&gt;_tcountof_struct_helper&lt;T, N&gt;;
  
  // _tcountof(x) gets the size of a TCHAR array.
  // Will fail to compile if x is not of type TCHAR array.
  #define _tcountof(x) (decltype(_tcountof_function_helper(x))::value)
  </code></pre>
  
  <p>Now this works very well.  It compiles and doesn't allow for any type other than a 1D array (unlike <a href="http://www.cplusplus.com/reference/type_traits/extent/" rel="nofollow"><code>extent</code></a> that MSVS implemented which allows for pointers as well as arrays, which of course should be invalid.  It allows only TCHAR arrays and I may also modify it later to accept a number to say which dimension to query for an nD array) and acts like compile time constant.  However, the editor is being annoying in that red squiggly lines are appearing under the call to my <code>_tcountof()</code> macro and when I hover over it, it says: <code>Error: type name is not allowed</code>.</p>
  
  <p>Is this just an instance of a failure of the editor not keeping up with the compiler's development?  Is there a way to stop this red squiggly from appearing for this error or for a particular macro?</p>