diff --git a/include/boost/unordered/unordered_map.hpp b/include/boost/unordered/unordered_map.hpp index 849adefa..6d05471c 100644 --- a/include/boost/unordered/unordered_map.hpp +++ b/include/boost/unordered/unordered_map.hpp @@ -802,8 +802,7 @@ namespace boost { } template - typename boost::enable_if_c< - detail::are_transparent::value, + typename boost::enable_if_c::value, std::pair >::type insert_or_assign(BOOST_FWD_REF(Key) k, BOOST_FWD_REF(M) obj) { @@ -828,8 +827,8 @@ namespace boost { } template - typename boost::enable_if_c< - detail::are_transparent::value, iterator>::type + typename boost::enable_if_c::value, + iterator>::type insert_or_assign( const_iterator, BOOST_FWD_REF(Key) k, BOOST_FWD_REF(M) obj) { @@ -1009,6 +1008,14 @@ namespace boost { return table_.hash_to_bucket(table_.hash(k)); } + template + typename boost::enable_if_c::value, + size_type>::type + bucket(BOOST_FWD_REF(Key) k) const + { + return table_.hash_to_bucket(table_.hash(boost::forward(k))); + } + local_iterator begin(size_type n) { return table_.begin(n); @@ -1715,6 +1722,14 @@ namespace boost { return table_.hash_to_bucket(table_.hash(k)); } + template + typename boost::enable_if_c::value, + size_type>::type + bucket(BOOST_FWD_REF(Key) k) const + { + return table_.hash_to_bucket(table_.hash(boost::forward(k))); + } + local_iterator begin(size_type n) { return local_iterator(table_.begin(n)); diff --git a/include/boost/unordered/unordered_set.hpp b/include/boost/unordered/unordered_set.hpp index a054ed64..9542b492 100644 --- a/include/boost/unordered/unordered_set.hpp +++ b/include/boost/unordered/unordered_set.hpp @@ -571,6 +571,14 @@ namespace boost { return table_.hash_to_bucket(table_.hash(k)); } + template + typename boost::enable_if_c::value, + size_type>::type + bucket(BOOST_FWD_REF(Key) k) const + { + return table_.hash_to_bucket(table_.hash(boost::forward(k))); + } + local_iterator begin(size_type n) { return local_iterator(table_.begin(n)); @@ -1212,6 +1220,14 @@ namespace boost { return table_.hash_to_bucket(table_.hash(k)); } + template + typename boost::enable_if_c::value, + size_type>::type + bucket(BOOST_FWD_REF(Key) k) const + { + return table_.hash_to_bucket(table_.hash(boost::forward(k))); + } + local_iterator begin(size_type n) { return local_iterator(table_.begin(n));