From e5f1a2d0450c4dd16bc8b16d842bbda982990502 Mon Sep 17 00:00:00 2001 From: Gudmundur Adalsteinsson Date: Thu, 15 Aug 2019 22:09:14 +0000 Subject: [PATCH] Problem: C++14 features not detected using MSVC Solution: Detect C++14 via C++17 --- zmq.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zmq.hpp b/zmq.hpp index e24ff38..c1ddeec 100644 --- a/zmq.hpp +++ b/zmq.hpp @@ -30,7 +30,9 @@ #if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(_MSC_VER) && _MSC_VER >= 1900) #define ZMQ_CPP11 #endif -#if (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) +#if (defined(__cplusplus) && __cplusplus >= 201402L) || \ + (defined(_HAS_CXX14) && _HAS_CXX14 == 1) || \ + (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // _HAS_CXX14 might not be defined when using C++17 on MSVC #define ZMQ_CPP14 #endif #if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1)