Merge pull request #21 from BlackMATov/dev

Dev
This commit is contained in:
2019-05-27 20:59:39 +07:00
committed by GitHub
9 changed files with 0 additions and 54 deletions

View File

@@ -183,7 +183,6 @@ void clear();
iterator erase(const_iterator iter);
iterator erase(const_iterator first, const_iterator last);
size_type erase(const key_type& key);
template < typename K > size_type erase(const K& key);
void swap(flat_set& other);
```
@@ -431,7 +430,6 @@ void clear();
iterator erase(const_iterator iter);
iterator erase(const_iterator first, const_iterator last);
size_type erase(const key_type& key);
template < typename K > size_type erase(const K& key);
void swap(flat_map& other)
```
@@ -666,7 +664,6 @@ void clear();
iterator erase(const_iterator iter);
iterator erase(const_iterator first, const_iterator last);
size_type erase(const key_type& key);
template < typename K > size_type erase(const K& key);
void swap(flat_multiset& other);
```
@@ -914,7 +911,6 @@ void clear();
iterator erase(const_iterator iter);
iterator erase(const_iterator first, const_iterator last);
size_type erase(const key_type& key);
template < typename K > size_type erase(const K& key);
void swap(flat_multimap& other)
```

View File

@@ -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>)

View File

@@ -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>)

View File

@@ -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>)

View File

@@ -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>)

View File

@@ -424,7 +424,6 @@ TEST_CASE("flat_map") {
REQUIRE(s0.upper_bound(std::string_view("hello")) == s0.begin() + 1);
REQUIRE(my_as_const(s0).upper_bound(std::string_view("hello")) == s0.begin() + 1);
REQUIRE(s0.erase(std::string_view("hello")) == 1);
REQUIRE(s0.at(std::string_view("world")) == 84);
REQUIRE(my_as_const(s0).at(std::string_view("world")) == 84);
}

View File

@@ -426,7 +426,6 @@ TEST_CASE("flat_multimap") {
REQUIRE(s0.upper_bound(std::string_view("hello")) == s0.begin() + 1);
REQUIRE(my_as_const(s0).upper_bound(std::string_view("hello")) == s0.begin() + 1);
REQUIRE(s0.erase(std::string_view("hello")) == 1);
REQUIRE(s0.at(std::string_view("world")) == 84);
REQUIRE(my_as_const(s0).at(std::string_view("world")) == 84);
}

View File

@@ -401,8 +401,6 @@ TEST_CASE("flat_multiset") {
REQUIRE(s0.upper_bound(std::string_view("hello")) == s0.begin() + 1);
REQUIRE(my_as_const(s0).upper_bound(std::string_view("hello")) == s0.begin() + 1);
REQUIRE(s0.erase(std::string_view("hello")) == 1);
}
SECTION("observers") {
struct my_less {

View File

@@ -399,8 +399,6 @@ TEST_CASE("flat_set") {
REQUIRE(s0.upper_bound(std::string_view("hello")) == s0.begin() + 1);
REQUIRE(my_as_const(s0).upper_bound(std::string_view("hello")) == s0.begin() + 1);
REQUIRE(s0.erase(std::string_view("hello")) == 1);
}
SECTION("observers") {
struct my_less {