mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
fixed call ambiguities in insert_or_visit
This commit is contained in:
@ -453,16 +453,26 @@ public:
|
|||||||
group_exclusive{},std::forward<F>(f),std::move(x));
|
group_exclusive{},std::forward<F>(f),std::move(x));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* typename=void tilts call ambiguities in favor of init_type */
|
/* SFINAE tilts call ambiguities in favor of init_type */
|
||||||
|
|
||||||
template<typename F,typename=void>
|
template<typename Value,typename F>
|
||||||
BOOST_FORCEINLINE bool insert_or_visit(const value_type& x,F&& f)
|
BOOST_FORCEINLINE auto insert_or_visit(const Value& x,F&& f)
|
||||||
|
->typename std::enable_if<
|
||||||
|
!std::is_same<init_type,value_type>::value&&
|
||||||
|
std::is_same<Value,value_type>::value,
|
||||||
|
bool
|
||||||
|
>::type
|
||||||
{
|
{
|
||||||
return emplace_or_visit_impl(group_exclusive{},std::forward<F>(f),x);
|
return emplace_or_visit_impl(group_exclusive{},std::forward<F>(f),x);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename F,typename=void>
|
template<typename Value,typename F>
|
||||||
BOOST_FORCEINLINE bool insert_or_visit(value_type&& x,F&& f)
|
BOOST_FORCEINLINE auto insert_or_visit(Value&& x,F&& f)
|
||||||
|
->typename std::enable_if<
|
||||||
|
!std::is_same<init_type,value_type>::value&&
|
||||||
|
std::is_same<Value,value_type>::value,
|
||||||
|
bool
|
||||||
|
>::type
|
||||||
{
|
{
|
||||||
return emplace_or_visit_impl(
|
return emplace_or_visit_impl(
|
||||||
group_exclusive{},std::forward<F>(f),std::move(x));
|
group_exclusive{},std::forward<F>(f),std::move(x));
|
||||||
|
Reference in New Issue
Block a user