Skip to content

Commit

Permalink
Add fix for both Boost.Asio and Boost.Python build.
Browse files Browse the repository at this point in the history
  • Loading branch information
o01eg committed May 19, 2019
1 parent 172771f commit 9e41cbb
Showing 1 changed file with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From 569cba5d47e20e9fae8ac8abfe428fab3cc95549 Mon Sep 17 00:00:00 2001
From: Christopher Kohlhoff <chris@kohlhoff.com>
Date: Mon, 5 Nov 2018 23:07:02 +1100
Subject: [PATCH] Test language version using _MSVC_LANG rather than
_HAS_CXX17.

---
boost/asio/detail/config.hpp | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/boost/asio/detail/config.hpp b/boost/asio/detail/config.hpp
index db12f171e..cf96c7ad2 100644
--- a/boost/asio/detail/config.hpp
+++ b/boost/asio/detail/config.hpp
@@ -70,9 +70,6 @@
# define BOOST_ASIO_MSVC _MSC_VER
# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
#endif // !defined(BOOST_ASIO_MSVC)
-#if defined(BOOST_ASIO_MSVC)
-# include <ciso646> // Needed for _HAS_CXX17.
-#endif // defined(BOOST_ASIO_MSVC)

// Clang / libc++ detection.
#if defined(__clang__)
@@ -790,9 +787,9 @@
# endif // (__cplusplus >= 201703)
# endif // (__GNUC__ >= 7)
# elif defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1910 && _HAS_CXX17)
+# if (_MSC_VER >= 1910 && _MSVC_LANG >= 201703)
# define BOOST_ASIO_HAS_STD_STRING_VIEW
-# endif // (_MSC_VER >= 1910 && _HAS_CXX17)
+# endif // (_MSC_VER >= 1910 && _MSVC_LANG >= 201703)
# endif // defined(BOOST_ASIO_MSVC)
# endif // !defined(BOOST_ASIO_DISABLE_STD_STRING_VIEW)
#endif // !defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
@@ -851,9 +848,9 @@
#if !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
# if !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT)
# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1910 && _HAS_CXX17)
+# if (_MSC_VER >= 1910 && _MSVC_LANG >= 201703)
# define BOOST_ASIO_HAS_STD_INVOKE_RESULT 1
-# endif // (_MSC_VER >= 1910 && _HAS_CXX17)
+# endif // (_MSC_VER >= 1910 && _MSVC_LANG >= 201703)
# endif // defined(BOOST_ASIO_MSVC)
# endif // !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT)
#endif // !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)

0 comments on commit 9e41cbb

Please sign in to comment.