From b719777942cf803cc1652d9865e7970bb0260296 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 1 Oct 2021 01:07:32 +0300 Subject: [PATCH] Do not rely on result_type for standard function objects on C++17 or above --- include/boost/bind/detail/result_traits.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/bind/detail/result_traits.hpp b/include/boost/bind/detail/result_traits.hpp index e6b8a44..dedc668 100644 --- a/include/boost/bind/detail/result_traits.hpp +++ b/include/boost/bind/detail/result_traits.hpp @@ -21,7 +21,9 @@ // See http://www.boost.org/libs/bind/bind.html for documentation. // -#if defined(_MSVC_LANG) && _MSVC_LANG >= 17 +#include + +#if BOOST_CXX_VERSION >= 201700L #include #endif @@ -48,7 +50,7 @@ template struct result_traits< unspecified, reference_wrapper > typedef typename F::result_type type; }; -#if defined(_MSVC_LANG) && _MSVC_LANG >= 17 +#if BOOST_CXX_VERSION >= 201700L template struct result_traits< unspecified, std::plus > {