add try_emplace and insert_or_assign functions #27

This commit is contained in:
2019-06-03 00:12:40 +07:00
parent 8237a106ea
commit d7ecb21109
3 changed files with 80 additions and 0 deletions

View File

@@ -477,6 +477,11 @@ std::pair<iterator, bool> insert(const value_type& value);
iterator insert(const_iterator hint, value_type&& value);
iterator insert(const_iterator hint, const value_type& value);
template < typename TT >
std::pair<iterator, bool> insert_or_assign(key_type&& key, TT&& value);
template < typename TT >
std::pair<iterator, bool> insert_or_assign(const key_type& key, TT&& value);
template < typename InputIter >
void insert(InputIter first, InputIter last);
template < typename InputIter >
@@ -490,6 +495,11 @@ std::pair<iterator, bool> emplace(Args&&... args);
template < typename... Args >
iterator emplace_hint(const_iterator hint, Args&&... args);
template < typename... Args >
std::pair<iterator, bool> try_emplace(key_type&& key, Args&&... args);
template < typename... Args >
std::pair<iterator, bool> try_emplace(const key_type& key, Args&&... args);
void clear();
iterator erase(const_iterator iter);
iterator erase(const_iterator first, const_iterator last);