mirror of
https://github.com/BlackMATov/flat.hpp.git
synced 2026-01-04 17:21:08 +07:00
remove heterogeneous erase
This commit is contained in:
@@ -358,17 +358,6 @@ namespace flat_hpp
|
||||
: 0;
|
||||
}
|
||||
|
||||
template < typename K >
|
||||
std::enable_if_t<
|
||||
detail::is_transparent_v<Compare, K>,
|
||||
size_type>
|
||||
erase(const K& key) {
|
||||
const const_iterator iter = find(key);
|
||||
return iter != end()
|
||||
? (erase(iter), 1)
|
||||
: 0;
|
||||
}
|
||||
|
||||
void swap(flat_map& other)
|
||||
noexcept(std::is_nothrow_swappable_v<base_type>
|
||||
&& std::is_nothrow_swappable_v<container_type>)
|
||||
|
||||
@@ -354,17 +354,6 @@ namespace flat_hpp
|
||||
return r;
|
||||
}
|
||||
|
||||
template < typename K >
|
||||
std::enable_if_t<
|
||||
detail::is_transparent_v<Compare, K>,
|
||||
size_type>
|
||||
erase(const K& key) {
|
||||
const auto p = equal_range(key);
|
||||
size_type r = std::distance(p.first, p.second);
|
||||
erase(p.first, p.second);
|
||||
return r;
|
||||
}
|
||||
|
||||
void swap(flat_multimap& other)
|
||||
noexcept(std::is_nothrow_swappable_v<base_type>
|
||||
&& std::is_nothrow_swappable_v<container_type>)
|
||||
|
||||
@@ -281,17 +281,6 @@ namespace flat_hpp
|
||||
return r;
|
||||
}
|
||||
|
||||
template < typename K >
|
||||
std::enable_if_t<
|
||||
detail::is_transparent_v<Compare, K>,
|
||||
size_type>
|
||||
erase(const K& key) {
|
||||
const auto p = equal_range(key);
|
||||
size_type r = std::distance(p.first, p.second);
|
||||
erase(p.first, p.second);
|
||||
return r;
|
||||
}
|
||||
|
||||
void swap(flat_multiset& other)
|
||||
noexcept(std::is_nothrow_swappable_v<base_type>
|
||||
&& std::is_nothrow_swappable_v<container_type>)
|
||||
|
||||
@@ -285,17 +285,6 @@ namespace flat_hpp
|
||||
: 0;
|
||||
}
|
||||
|
||||
template < typename K >
|
||||
std::enable_if_t<
|
||||
detail::is_transparent_v<Compare, K>,
|
||||
size_type>
|
||||
erase(const K& key) {
|
||||
const const_iterator iter = find(key);
|
||||
return iter != end()
|
||||
? (erase(iter), 1)
|
||||
: 0;
|
||||
}
|
||||
|
||||
void swap(flat_set& other)
|
||||
noexcept(std::is_nothrow_swappable_v<base_type>
|
||||
&& std::is_nothrow_swappable_v<container_type>)
|
||||
|
||||
Reference in New Issue
Block a user