title: Visual Studio sizeof illegal operand
body: <p>I am currently porting a program developed on Linux to Win32. Amongst other problems, I have one that is pretty weird.
  A header file contains something like this:</p>
  
  <pre><code>namespace Networking {
    struct  MetaStruct
    {
      int   iDataType;
      int   iDataSize;
      void* pData;
    };
  
    const int MetaStructSize = sizeof(MetaStruct) - sizeof(MetaStruct::pData);
  };
  </code></pre>
  
  <p>This compiles fine on fine on Linux, but I get this error when compiling for Win32 using VS2010:
  <code>Networking.hpp(50): error C2070: '': illegal sizeof operand</code></p>
  
  <p>I tried adding the <code>Networking::</code> before <code>MetaStruct</code> but it doesn't change anything. The weird thing is VS2010 gives me the correct value of the <code>sizeof</code> when I hover it with the mouse, but won't compile it. Why?</p>