Skip to content

Commit

Permalink
Update concurrent_map.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Lastique authored Apr 4, 2021
1 parent e99f68c commit a5f0bb5
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions include/oneapi/tbb/concurrent_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,6 @@ class concurrent_map : public concurrent_skip_list<map_traits<Key, Value, Compar
// Include constructors of base type
using base_type::base_type;

concurrent_map() = default;
concurrent_map(const concurrent_map&) = default;
concurrent_map(concurrent_map&&) = default;

concurrent_map& operator= (const concurrent_map&) = default;
concurrent_map& operator= (concurrent_map&&) = default;
concurrent_map& operator= (std::initializer_list<value_type> il) {
base_type::operator= (il);
return *this;
}

// Required for implicit deduction guides
concurrent_map() = default;
concurrent_map( const concurrent_map& ) = default;
Expand All @@ -114,6 +103,11 @@ class concurrent_map : public concurrent_skip_list<map_traits<Key, Value, Compar
concurrent_map& operator=( const concurrent_map& ) = default;
concurrent_map& operator=( concurrent_map&& ) = default;

concurrent_map& operator=( std::initializer_list<value_type> il ) {
base_type::operator= (il);
return *this;
}

// Observers
mapped_type& at(const key_type& key) {
iterator it = this->find(key);
Expand Down Expand Up @@ -250,17 +244,6 @@ class concurrent_multimap : public concurrent_skip_list<map_traits<Key, Value, C
using base_type::base_type;
using base_type::insert;

concurrent_multimap() = default;
concurrent_multimap(const concurrent_multimap&) = default;
concurrent_multimap(concurrent_multimap&&) = default;

concurrent_multimap& operator= (const concurrent_multimap&) = default;
concurrent_multimap& operator= (concurrent_multimap&&) = default;
concurrent_multimap& operator= (std::initializer_list<value_type> il) {
base_type::operator= (il);
return *this;
}

// Required for implicit deduction guides
concurrent_multimap() = default;
concurrent_multimap( const concurrent_multimap& ) = default;
Expand All @@ -271,6 +254,11 @@ class concurrent_multimap : public concurrent_skip_list<map_traits<Key, Value, C
concurrent_multimap& operator=( const concurrent_multimap& ) = default;
concurrent_multimap& operator=( concurrent_multimap&& ) = default;

concurrent_multimap& operator=( std::initializer_list<value_type> il ) {
base_type::operator= (il);
return *this;
}

template <typename P>
typename std::enable_if<std::is_constructible<value_type, P&&>::value,
std::pair<iterator, bool>>::type insert( P&& value )
Expand Down

0 comments on commit a5f0bb5

Please sign in to comment.