1
0
forked from boostorg/core

Workaround for MSVC 2015 expression SFINAE

This commit is contained in:
Glen Fernandes
2020-05-24 02:45:00 -04:00
parent 0159b6d8e5
commit 9f2dbba2fc

View File

@ -18,9 +18,7 @@ Distributed under the Boost Software License, Version 1.0.
#include <utility> #include <utility>
#endif #endif
#if !defined(BOOST_NO_CXX11_DECLTYPE) && \ #if !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_SFINAE_EXPR)
!defined(BOOST_NO_SFINAE_EXPR) && \
(!defined(BOOST_MSVC) || BOOST_MSVC >= 1910)
#define BOOST_CORE_ALLOCATOR_DETECTION #define BOOST_CORE_ALLOCATOR_DETECTION
#endif #endif
@ -257,10 +255,10 @@ struct alloc_has_allocate {
#if defined(BOOST_CORE_ALLOCATOR_DETECTION) #if defined(BOOST_CORE_ALLOCATOR_DETECTION)
template<class A> template<class A>
struct alloc_has_allocate<A, typename struct alloc_has_allocate<A,
alloc_void<decltype(alloc_declval<A&>().allocate(alloc_declval<typename decltype(alloc_declval<A&>().allocate(alloc_declval<typename
boost::allocator_size_type<A>::type>(), alloc_declval<typename boost::allocator_size_type<A>::type>(), alloc_declval<typename
boost::allocator_const_void_pointer<A>::type>()))>::type> { boost::allocator_const_void_pointer<A>::type>()), void())> {
BOOST_STATIC_CONSTEXPR bool value = true; BOOST_STATIC_CONSTEXPR bool value = true;
}; };
#endif #endif
@ -303,8 +301,7 @@ struct alloc_has_construct {
#if defined(BOOST_CORE_ALLOCATOR_DETECTION) #if defined(BOOST_CORE_ALLOCATOR_DETECTION)
template<class A, class T> template<class A, class T>
struct alloc_has_construct<A, T, struct alloc_has_construct<A, T,
typename alloc_void<decltype(alloc_declval<A&>() decltype(alloc_declval<A&>().construct(alloc_declval<T*>()), void())> {
.construct(alloc_declval<T*>()))>::type> {
BOOST_STATIC_CONSTEXPR bool value = true; BOOST_STATIC_CONSTEXPR bool value = true;
}; };
#endif #endif
@ -338,9 +335,9 @@ struct alloc_has_construct_args {
#if defined(BOOST_CORE_ALLOCATOR_DETECTION) #if defined(BOOST_CORE_ALLOCATOR_DETECTION)
template<class A, class T, class... Args> template<class A, class T, class... Args>
struct alloc_has_construct_args<typename struct alloc_has_construct_args<decltype(alloc_declval<A
alloc_void<decltype(alloc_declval<A&>().construct(alloc_declval<T*>(), &>().construct(alloc_declval<T*>(), alloc_declval<Args&&>()...), void()),
alloc_declval<Args&&>()...))>::type, A, T, Args...> { A, T, Args...> {
BOOST_STATIC_CONSTEXPR bool value = true; BOOST_STATIC_CONSTEXPR bool value = true;
}; };
#endif #endif
@ -372,9 +369,9 @@ struct alloc_has_construct_arg {
#if defined(BOOST_CORE_ALLOCATOR_DETECTION) #if defined(BOOST_CORE_ALLOCATOR_DETECTION)
template<class A, class T, class V> template<class A, class T, class V>
struct alloc_has_construct_arg<A, T, V, typename struct alloc_has_construct_arg<A, T, V,
alloc_void<decltype(alloc_declval<A&>().construct(alloc_declval<T*>(), decltype(alloc_declval<A&>().construct(alloc_declval<T*>(),
alloc_declval<V>()))>::type> { alloc_declval<V>()), void())> {
BOOST_STATIC_CONSTEXPR bool value = true; BOOST_STATIC_CONSTEXPR bool value = true;
}; };
#endif #endif
@ -441,9 +438,8 @@ struct alloc_has_destroy {
#if defined(BOOST_CORE_ALLOCATOR_DETECTION) #if defined(BOOST_CORE_ALLOCATOR_DETECTION)
template<class A, class T> template<class A, class T>
struct alloc_has_destroy<A, T, typename struct alloc_has_destroy<A, T,
alloc_void<decltype(alloc_declval<A&>(). decltype(alloc_declval<A&>().destroy(alloc_declval<T*>()), void())> {
destroy(alloc_declval<T*>()))>::type> {
BOOST_STATIC_CONSTEXPR bool value = true; BOOST_STATIC_CONSTEXPR bool value = true;
}; };
#endif #endif
@ -475,8 +471,7 @@ struct alloc_has_max_size {
#if defined(BOOST_CORE_ALLOCATOR_DETECTION) #if defined(BOOST_CORE_ALLOCATOR_DETECTION)
template<class A> template<class A>
struct alloc_has_max_size<A, struct alloc_has_max_size<A,
typename alloc_void<decltype(alloc_declval<const decltype(alloc_declval<const A&>().max_size(), void())> {
A&>().max_size())>::type> {
BOOST_STATIC_CONSTEXPR bool value = true; BOOST_STATIC_CONSTEXPR bool value = true;
}; };
#endif #endif
@ -510,8 +505,8 @@ struct alloc_has_soccc {
#if defined(BOOST_CORE_ALLOCATOR_DETECTION) #if defined(BOOST_CORE_ALLOCATOR_DETECTION)
template<class A> template<class A>
struct alloc_has_soccc<A, struct alloc_has_soccc<A,
typename alloc_void<decltype(alloc_declval<const decltype(alloc_declval<const A&>().select_on_container_copy_construction(),
A&>().select_on_container_copy_construction())>::type> { void())> {
BOOST_STATIC_CONSTEXPR bool value = true; BOOST_STATIC_CONSTEXPR bool value = true;
}; };
#endif #endif