diff --git a/include/boost/unordered/detail/foa/concurrent_table.hpp b/include/boost/unordered/detail/foa/concurrent_table.hpp index 83360cbc..4272bedc 100644 --- a/include/boost/unordered/detail/foa/concurrent_table.hpp +++ b/include/boost/unordered/detail/foa/concurrent_table.hpp @@ -453,16 +453,26 @@ public: group_exclusive{},std::forward(f),std::move(x)); } - /* typename=void tilts call ambiguities in favor of init_type */ + /* SFINAE tilts call ambiguities in favor of init_type */ - template - BOOST_FORCEINLINE bool insert_or_visit(const value_type& x,F&& f) + template + BOOST_FORCEINLINE auto insert_or_visit(const Value& x,F&& f) + ->typename std::enable_if< + !std::is_same::value&& + std::is_same::value, + bool + >::type { return emplace_or_visit_impl(group_exclusive{},std::forward(f),x); } - template - BOOST_FORCEINLINE bool insert_or_visit(value_type&& x,F&& f) + template + BOOST_FORCEINLINE auto insert_or_visit(Value&& x,F&& f) + ->typename std::enable_if< + !std::is_same::value&& + std::is_same::value, + bool + >::type { return emplace_or_visit_impl( group_exclusive{},std::forward(f),std::move(x));