From 99447c57cf002512a6a918634c2e7ccdefd4e86a Mon Sep 17 00:00:00 2001 From: James Darpinian Date: Wed, 24 Oct 2018 03:02:02 -0700 Subject: [PATCH] MSVC can't handle constexpr INVALID_HANDLE_VALUE Causes error C2131: expression did not evaluate to a constant note: failure was caused by unevaluable pointer value --- include/mio/mmap.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mio/mmap.hpp b/include/mio/mmap.hpp index 91b2f63..cfd15de 100644 --- a/include/mio/mmap.hpp +++ b/include/mio/mmap.hpp @@ -51,7 +51,7 @@ using file_handle_type = int; // This value represents an invalid file handle type. This can be used to // determine whether `basic_mmap::file_handle` is valid, for example. -constexpr static file_handle_type invalid_handle = INVALID_HANDLE_VALUE; +const static file_handle_type invalid_handle = INVALID_HANDLE_VALUE; template struct basic_mmap