title: Cannot assign INVALID_HANDLE_VALUE to constexpr HANDLE when making typedefs for Winapi
body: <p>I made the following code to make my code less ugly and to not have to worry about too aggressively separating windows implementations from the rest of the code.</p>
  <pre><code>#pragma once
  #ifdef _WIN32
  #include &quot;windows.h&quot;
  
  namespace RawHttp
  {
  namespace Win
  {
  
  using Bool = BOOL;
  using Handle = HANDLE;
  using Dword = DWORD;
  constexpr const Handle Null = NULL;
  constexpr const Handle InvalidHandle = static_cast&lt;Handle&gt;(INVALID_HANDLE_VALUE);
  }
  }
  #else
  namespace RawHttp
  {
  namespace Win
  {
  
  using Bool = bool;
  using Handle = void *;
  using Dword = unsigned long;
  constexpr const Handle Null = nullptr;
  constexpr const Handle InvalidHandle = (Handle)(long long)-1;
  }
  }
  #endif //_WIN32
  </code></pre>
  <p>If included in a C++ file, it fails to compile in Visual Studio:</p>
  <pre><code>windows\windowstypes.h(14): error C2131: expression did not evaluate to a constant
  windows\windowstypes.h(14): note: failure was caused by unevaluable pointer value
  </code></pre>
  <p>In G++, it compiles just fine. What does that error even mean?</p>
  <p>How to properly cast the window's <code>INVALID_HANDLE_VALUE</code> to <code>constexpr void*</code>, and how to do the same in the non windows branch of the code above?</p>
  <p>My Visual Studio Version is 15.9.18.</p>