From 9f2dbba2fc16d169797f58fd89005502a1f2af24 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Sun, 24 May 2020 02:45:00 -0400 Subject: [PATCH] Workaround for MSVC 2015 expression SFINAE --- include/boost/core/allocator_access.hpp | 37 +++++++++++-------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/include/boost/core/allocator_access.hpp b/include/boost/core/allocator_access.hpp index 22e47c5..8398589 100644 --- a/include/boost/core/allocator_access.hpp +++ b/include/boost/core/allocator_access.hpp @@ -18,9 +18,7 @@ Distributed under the Boost Software License, Version 1.0. #include #endif -#if !defined(BOOST_NO_CXX11_DECLTYPE) && \ - !defined(BOOST_NO_SFINAE_EXPR) && \ - (!defined(BOOST_MSVC) || BOOST_MSVC >= 1910) +#if !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_SFINAE_EXPR) #define BOOST_CORE_ALLOCATOR_DETECTION #endif @@ -257,10 +255,10 @@ struct alloc_has_allocate { #if defined(BOOST_CORE_ALLOCATOR_DETECTION) template -struct alloc_has_allocate().allocate(alloc_declval().allocate(alloc_declval::type>(), alloc_declval::type>()))>::type> { + boost::allocator_const_void_pointer::type>()), void())> { BOOST_STATIC_CONSTEXPR bool value = true; }; #endif @@ -303,8 +301,7 @@ struct alloc_has_construct { #if defined(BOOST_CORE_ALLOCATOR_DETECTION) template struct alloc_has_construct() - .construct(alloc_declval()))>::type> { + decltype(alloc_declval().construct(alloc_declval()), void())> { BOOST_STATIC_CONSTEXPR bool value = true; }; #endif @@ -338,9 +335,9 @@ struct alloc_has_construct_args { #if defined(BOOST_CORE_ALLOCATOR_DETECTION) template -struct alloc_has_construct_args().construct(alloc_declval(), - alloc_declval()...))>::type, A, T, Args...> { +struct alloc_has_construct_args().construct(alloc_declval(), alloc_declval()...), void()), + A, T, Args...> { BOOST_STATIC_CONSTEXPR bool value = true; }; #endif @@ -372,9 +369,9 @@ struct alloc_has_construct_arg { #if defined(BOOST_CORE_ALLOCATOR_DETECTION) template -struct alloc_has_construct_arg().construct(alloc_declval(), - alloc_declval()))>::type> { +struct alloc_has_construct_arg().construct(alloc_declval(), + alloc_declval()), void())> { BOOST_STATIC_CONSTEXPR bool value = true; }; #endif @@ -441,9 +438,8 @@ struct alloc_has_destroy { #if defined(BOOST_CORE_ALLOCATOR_DETECTION) template -struct alloc_has_destroy(). - destroy(alloc_declval()))>::type> { +struct alloc_has_destroy().destroy(alloc_declval()), void())> { BOOST_STATIC_CONSTEXPR bool value = true; }; #endif @@ -475,8 +471,7 @@ struct alloc_has_max_size { #if defined(BOOST_CORE_ALLOCATOR_DETECTION) template struct alloc_has_max_size().max_size())>::type> { + decltype(alloc_declval().max_size(), void())> { BOOST_STATIC_CONSTEXPR bool value = true; }; #endif @@ -510,8 +505,8 @@ struct alloc_has_soccc { #if defined(BOOST_CORE_ALLOCATOR_DETECTION) template struct alloc_has_soccc().select_on_container_copy_construction())>::type> { + decltype(alloc_declval().select_on_container_copy_construction(), + void())> { BOOST_STATIC_CONSTEXPR bool value = true; }; #endif