@@ -1069,6 +1069,29 @@ class map
10691069 return BOOST_MOVE_RET (node_type, nh);
10701070 }
10711071
1072+ // ! <b>Requires</b>: This overload is available only if
1073+ // ! key_compare::is_transparent exists.
1074+ // !
1075+ // ! <b>Effects</b>: Removes the first element in the container with key equivalent to k.
1076+ // !
1077+ // ! <b>Returns</b>: A node_type owning the element if found, otherwise an empty node_type.
1078+ // !
1079+ // ! <b>Complexity</b>: log(size()).
1080+ template <class K >
1081+ inline BOOST_CONTAINER_DOC1ST
1082+ (node_type
1083+ , typename dtl::enable_if_c<
1084+ dtl::is_transparent<key_compare>::value && // transparent
1085+ !dtl::is_convertible<K BOOST_MOVE_I iterator>::value && // not convertible to iterator
1086+ !dtl::is_convertible<K BOOST_MOVE_I const_iterator>::value // not convertible to const_iterator
1087+ BOOST_MOVE_I node_type>::type)
1088+ extract (BOOST_FWD_REF (K) k)
1089+ {
1090+ typename base_t ::node_type base_nh (this ->base_t ::extract (k));
1091+ node_type nh (boost::move (base_nh));
1092+ return BOOST_MOVE_RET (node_type, nh);
1093+ }
1094+
10721095 // ! <b>Effects</b>: Removes the element pointed to by "position".
10731096 // !
10741097 // ! <b>Returns</b>: A node_type owning the element, otherwise an empty node_type.
@@ -2043,6 +2066,22 @@ class multimap
20432066 return node_type (boost::move (base_nh));
20442067 }
20452068
2069+ // ! @copydoc ::boost::container::map::extract(K&&)
2070+ template <class K >
2071+ inline BOOST_CONTAINER_DOC1ST
2072+ (node_type
2073+ , typename dtl::enable_if_c<
2074+ dtl::is_transparent<key_compare>::value && // transparent
2075+ !dtl::is_convertible<K BOOST_MOVE_I iterator>::value && // not convertible to iterator
2076+ !dtl::is_convertible<K BOOST_MOVE_I const_iterator>::value // not convertible to const_iterator
2077+ BOOST_MOVE_I node_type>::type)
2078+ extract (BOOST_FWD_REF (K) k)
2079+ {
2080+ typename base_t ::node_type base_nh (this ->base_t ::extract (k));
2081+ node_type nh (boost::move (base_nh));
2082+ return BOOST_MOVE_RET (node_type, nh);
2083+ }
2084+
20462085 // ! @copydoc ::boost::container::map::extract(const_iterator)
20472086 node_type extract (const_iterator position)
20482087 {
0 commit comments