From c3477b2624361c5e111c19fe6f8e50ab64f8b0e5 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 29 Oct 2011 16:31:40 +0000 Subject: [PATCH] Unordered: Don't use SFINAE expression hack on Visual C++. Sometimes it doesn't work. This means I can clean up the implementation for other compilers, but I'll leave that for now. [SVN r75167] --- doc/compliance.qbk | 4 +--- include/boost/unordered/detail/allocator_helpers.hpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/compliance.qbk b/doc/compliance.qbk index 622b053f..f48881ab 100644 --- a/doc/compliance.qbk +++ b/doc/compliance.qbk @@ -36,9 +36,7 @@ A full implementation of `allocator_traits` requires sophisticated member function detection so that the fallback is used whenever the member function call is not well formed. This requires support for SFINAE expressions, which are available on -GCC from version 4.4 and Clang. They aren't supported by -Visual C++ 2008/2010, but with a bit of hacking it's possible to support -certain use cases. +GCC from version 4.4 and Clang. On other compilers, there's just a test to see if the allocator has a member, but no check that it can be called. So rather than using a diff --git a/include/boost/unordered/detail/allocator_helpers.hpp b/include/boost/unordered/detail/allocator_helpers.hpp index 216eeaef..e770960e 100644 --- a/include/boost/unordered/detail/allocator_helpers.hpp +++ b/include/boost/unordered/detail/allocator_helpers.hpp @@ -108,7 +108,7 @@ namespace boost { namespace unordered { namespace detail { convert_from_anything(T const&); }; -#if !defined(BOOST_NO_SFINAE_EXPR) || BOOST_WORKAROUND(BOOST_MSVC, >= 1500) +#if !defined(BOOST_NO_SFINAE_EXPR) # define BOOST_UNORDERED_HAVE_CALL_DETECTION 1