diff --git a/src/types.hpp b/src/types.hpp index 0c87a40c..80584212 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -28,7 +28,7 @@ limitations under the License. typedef unsigned __int64 uint64_t; typedef __int64 int64_t; #else - #if __cplusplus >= 201103L + #if (__cplusplus >= 201103L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) // C++11 or later #include #include @@ -45,10 +45,10 @@ limitations under the License. #define snprintf _snprintf #endif - #if !defined(__x86_64__) + #if defined(_M_X64) && !defined(__x86_64__) #define __x86_64__ _M_X64 #endif - #if !defined(__i386__) + #if defined(_M_IX86) && !defined(__i386__) #define __i386__ _M_IX86 #endif #endif @@ -206,7 +206,7 @@ limitations under the License. namespace kanzi { -#if __cplusplus >= 201703L +#if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) using byte = std::byte; #else typedef uint8_t byte;