diff --git a/doc/changes.qbk b/doc/changes.qbk index 839b370f..54002878 100644 --- a/doc/changes.qbk +++ b/doc/changes.qbk @@ -276,5 +276,7 @@ C++11 support has resulted in some breaking changes: * Remove `BOOST_UNORDERED_DEPRECATED_EQUALITY` warning. * Simpler implementation of assignment, fixes an exception safety issue for `unordered_multiset` and `unordered_multimap`. Might be a little slower. +* Stop using return value SFINAE which some older compilers have issues + with. [endsect] diff --git a/include/boost/unordered/detail/equivalent.hpp b/include/boost/unordered/detail/equivalent.hpp index 407b5f79..b7b40f1a 100644 --- a/include/boost/unordered/detail/equivalent.hpp +++ b/include/boost/unordered/detail/equivalent.hpp @@ -484,8 +484,8 @@ namespace boost { namespace unordered { namespace detail { // if hash function throws, or inserting > 1 element, basic exception // safety. Strong otherwise template - typename boost::unordered::detail::enable_if_forward::type - insert_range(I i, I j) + void insert_range(I i, I j, typename + boost::unordered::detail::enable_if_forward::type = 0) { if(i == j) return; @@ -508,8 +508,8 @@ namespace boost { namespace unordered { namespace detail { } template - typename boost::unordered::detail::disable_if_forward::type - insert_range(I i, I j) + void insert_range(I i, I j, typename + boost::unordered::detail::disable_if_forward::type = 0) { node_constructor a(this->node_alloc()); for (; i != j; ++i) { diff --git a/include/boost/unordered/detail/util.hpp b/include/boost/unordered/detail/util.hpp index 14dcfd84..0a406c85 100644 --- a/include/boost/unordered/detail/util.hpp +++ b/include/boost/unordered/detail/util.hpp @@ -125,17 +125,15 @@ namespace boost { namespace unordered { namespace detail { // insert_size/initial_size template - inline typename - boost::unordered::detail::enable_if_forward::type - insert_size(I i, I j) + inline std::size_t insert_size(I i, I j, typename + boost::unordered::detail::enable_if_forward::type = 0) { return std::distance(i, j); } template - inline typename - boost::unordered::detail::disable_if_forward::type - insert_size(I, I) + inline std::size_t insert_size(I, I, typename + boost::unordered::detail::disable_if_forward::type = 0) { return 1; }