mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 11:27:15 +02:00
Update unordered_map
to use singular type trait for erase()
/ extract()
SFINAE
This commit is contained in:
@ -18,7 +18,6 @@
|
|||||||
#include <boost/functional/hash.hpp>
|
#include <boost/functional/hash.hpp>
|
||||||
#include <boost/move/move.hpp>
|
#include <boost/move/move.hpp>
|
||||||
#include <boost/type_traits/is_constructible.hpp>
|
#include <boost/type_traits/is_constructible.hpp>
|
||||||
#include <boost/type_traits/is_convertible.hpp>
|
|
||||||
#include <boost/unordered/detail/map.hpp>
|
#include <boost/unordered/detail/map.hpp>
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||||
@ -432,9 +431,7 @@ namespace boost {
|
|||||||
|
|
||||||
template <class Key>
|
template <class Key>
|
||||||
typename boost::enable_if_c<
|
typename boost::enable_if_c<
|
||||||
detail::are_transparent<Key, H, P>::value &&
|
detail::transparent_non_iterable<Key, unordered_map>::value,
|
||||||
!boost::is_convertible<Key, iterator>::value &&
|
|
||||||
!boost::is_convertible<Key, const_iterator>::value,
|
|
||||||
node_type>::type
|
node_type>::type
|
||||||
extract(BOOST_FWD_REF(Key) k)
|
extract(BOOST_FWD_REF(Key) k)
|
||||||
{
|
{
|
||||||
@ -724,9 +721,7 @@ namespace boost {
|
|||||||
|
|
||||||
template <class Key>
|
template <class Key>
|
||||||
typename boost::enable_if_c<
|
typename boost::enable_if_c<
|
||||||
detail::are_transparent<Key, H, P>::value &&
|
detail::transparent_non_iterable<Key, unordered_map>::value,
|
||||||
!boost::is_convertible<Key, iterator>::value &&
|
|
||||||
!boost::is_convertible<Key, const_iterator>::value,
|
|
||||||
size_type>::type
|
size_type>::type
|
||||||
erase(BOOST_FWD_REF(Key) k)
|
erase(BOOST_FWD_REF(Key) k)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user