Implement initial draft of heterogeneous extract()

This commit is contained in:
LeonineKing1199
2021-12-03 15:10:59 -08:00
parent 00b504ebc5
commit 13cd5aa4ce
3 changed files with 127 additions and 7 deletions

View File

@@ -427,7 +427,20 @@ namespace boost {
node_type extract(const key_type& k)
{
return node_type(table_.extract_by_key(k), table_.node_alloc());
return node_type(table_.extract_by_key_impl(k), table_.node_alloc());
}
template <class Key>
typename boost::enable_if_c<
detail::is_transparent<Key, H>::value &&
detail::is_transparent<Key, P>::value &&
!boost::is_convertible<Key, iterator>::value &&
!boost::is_convertible<Key, const_iterator>::value,
node_type>::type
extract(BOOST_FWD_REF(Key) k)
{
return node_type(table_.extract_by_key_impl(boost::forward<Key>(k)),
table_.node_alloc());
}
insert_return_type insert(BOOST_RV_REF(node_type) np)