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]
This commit is contained in:
Daniel James
2011-10-29 16:31:40 +00:00
parent a5dcc9dab0
commit c3477b2624
2 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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