diff --git a/include/oneapi/tbb/concurrent_map.h b/include/oneapi/tbb/concurrent_map.h index ae389d4f426..52122699b5f 100644 --- a/include/oneapi/tbb/concurrent_map.h +++ b/include/oneapi/tbb/concurrent_map.h @@ -92,7 +92,6 @@ class concurrent_map : public concurrent_skip_list il ) { + base_type::operator= (il); + return *this; + } + // Observers mapped_type& at(const key_type& key) { iterator it = this->find(key); @@ -239,7 +243,6 @@ class concurrent_multimap : public concurrent_skip_list il ) { + base_type::operator= (il); + return *this; + } + template typename std::enable_if::value, std::pair>::type insert( P&& value ) diff --git a/include/oneapi/tbb/concurrent_queue.h b/include/oneapi/tbb/concurrent_queue.h index c8ae7afff75..078a7c95e13 100644 --- a/include/oneapi/tbb/concurrent_queue.h +++ b/include/oneapi/tbb/concurrent_queue.h @@ -114,6 +114,11 @@ class concurrent_queue { r1::cache_aligned_deallocate(my_queue_representation); } + concurrent_queue& operator= (concurrent_queue src) { + internal_swap(src); + return *this; + } + // Enqueue an item at tail of queue. void push(const T& value) { internal_push(value); @@ -357,6 +362,11 @@ class concurrent_bounded_queue { sizeof(queue_representation_type)); } + concurrent_bounded_queue& operator= (concurrent_bounded_queue src) { + internal_swap(src); + return *this; + } + // Enqueue an item at tail of queue. void push( const T& value ) { internal_push(value); diff --git a/include/oneapi/tbb/concurrent_set.h b/include/oneapi/tbb/concurrent_set.h index c68fa6c362f..8552dab6bb3 100644 --- a/include/oneapi/tbb/concurrent_set.h +++ b/include/oneapi/tbb/concurrent_set.h @@ -75,7 +75,6 @@ class concurrent_set : public concurrent_skip_list il ) { + base_type::operator= (il); + return *this; + } + template void merge(concurrent_set& source) { this->internal_merge(source); @@ -172,7 +176,6 @@ class concurrent_multiset : public concurrent_skip_list il ) { + base_type::operator= (il); + return *this; + } + template void merge(concurrent_set& source) { this->internal_merge(source); diff --git a/include/oneapi/tbb/concurrent_unordered_map.h b/include/oneapi/tbb/concurrent_unordered_map.h index 0c9c2cd79ce..50449a45c35 100644 --- a/include/oneapi/tbb/concurrent_unordered_map.h +++ b/include/oneapi/tbb/concurrent_unordered_map.h @@ -70,7 +70,6 @@ class concurrent_unordered_map // Include constructors of base type using base_type::base_type; - using base_type::operator=; // Required for implicit deduction guides concurrent_unordered_map() = default; @@ -82,6 +81,11 @@ class concurrent_unordered_map concurrent_unordered_map& operator=( const concurrent_unordered_map& ) = default; concurrent_unordered_map& operator=( concurrent_unordered_map&& ) = default; + concurrent_unordered_map& operator=( std::initializer_list il ) { + base_type::operator= (il); + return *this; + } + // Observers mapped_type& operator[]( const key_type& key ) { iterator where = this->find(key); @@ -255,7 +259,6 @@ class concurrent_unordered_multimap // Include constructors of base type using base_type::base_type; - using base_type::operator=; using base_type::insert; // Required for implicit deduction guides @@ -268,6 +271,11 @@ class concurrent_unordered_multimap concurrent_unordered_multimap& operator=( const concurrent_unordered_multimap& ) = default; concurrent_unordered_multimap& operator=( concurrent_unordered_multimap&& ) = default; + concurrent_unordered_multimap& operator=( std::initializer_list il ) { + base_type::operator= (il); + return *this; + } + template typename std::enable_if::value, std::pair>::type insert( P&& value ) { diff --git a/include/oneapi/tbb/concurrent_unordered_set.h b/include/oneapi/tbb/concurrent_unordered_set.h index ce6175294d1..bcb1d80db76 100644 --- a/include/oneapi/tbb/concurrent_unordered_set.h +++ b/include/oneapi/tbb/concurrent_unordered_set.h @@ -68,7 +68,7 @@ class concurrent_unordered_set // Include constructors of base_type; using base_type::base_type; - using base_type::operator=; + // Required for implicit deduction guides concurrent_unordered_set() = default; concurrent_unordered_set( const concurrent_unordered_set& ) = default; @@ -79,6 +79,11 @@ class concurrent_unordered_set concurrent_unordered_set& operator=( const concurrent_unordered_set& ) = default; concurrent_unordered_set& operator=( concurrent_unordered_set&& ) = default; + concurrent_unordered_set& operator=( std::initializer_list il ) { + base_type::operator= (il); + return *this; + } + template void merge( concurrent_unordered_set& source ) { this->internal_merge(source); @@ -193,7 +198,6 @@ class concurrent_unordered_multiset // Include constructors of base_type; using base_type::base_type; - using base_type::operator=; // Required for implicit deduction guides concurrent_unordered_multiset() = default; @@ -205,6 +209,11 @@ class concurrent_unordered_multiset concurrent_unordered_multiset& operator=( const concurrent_unordered_multiset& ) = default; concurrent_unordered_multiset& operator=( concurrent_unordered_multiset&& ) = default; + concurrent_unordered_multiset& operator=( std::initializer_list il ) { + base_type::operator= (il); + return *this; + } + template void merge( concurrent_unordered_set& source ) { this->internal_merge(source);