forked from boostorg/unordered
stylistic
This commit is contained in:
committed by
Christian Mazakas
parent
ac1a236de6
commit
6b6dde4f97
@ -372,7 +372,7 @@ inline void swap(atomic_size_control& x,atomic_size_control& y)
|
|||||||
* - Parallel versions of [c]visit_all(f) and erase_if(f) are provided based
|
* - Parallel versions of [c]visit_all(f) and erase_if(f) are provided based
|
||||||
* on C++17 stdlib parallel algorithms.
|
* on C++17 stdlib parallel algorithms.
|
||||||
*
|
*
|
||||||
* Consult boost::unordered_flat_map docs for the full API reference.
|
* Consult boost::concurrent_flat_map docs for the full API reference.
|
||||||
* Heterogeneous lookup is suported by default, that is, without checking for
|
* Heterogeneous lookup is suported by default, that is, without checking for
|
||||||
* any ::is_transparent typedefs --this checking is done by the wrapping
|
* any ::is_transparent typedefs --this checking is done by the wrapping
|
||||||
* containers.
|
* containers.
|
||||||
@ -430,6 +430,8 @@ class concurrent_table:
|
|||||||
using prober=typename super::prober;
|
using prober=typename super::prober;
|
||||||
using arrays_type=typename super::arrays_type;
|
using arrays_type=typename super::arrays_type;
|
||||||
using size_ctrl_type=typename super::size_ctrl_type;
|
using size_ctrl_type=typename super::size_ctrl_type;
|
||||||
|
using compatible_nonconcurrent_table=table<TypePolicy,Hash,Pred,Allocator>;
|
||||||
|
friend class compatible_nonconcurrent_table;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using key_type=typename super::key_type;
|
using key_type=typename super::key_type;
|
||||||
@ -465,7 +467,7 @@ public:
|
|||||||
concurrent_table(concurrent_table&& x,const Allocator& al_):
|
concurrent_table(concurrent_table&& x,const Allocator& al_):
|
||||||
concurrent_table(std::move(x),al_,x.exclusive_access()){}
|
concurrent_table(std::move(x),al_,x.exclusive_access()){}
|
||||||
|
|
||||||
concurrent_table(table<TypePolicy,Hash,Pred,Allocator>&& x):
|
concurrent_table(compatible_nonconcurrent_table&& x):
|
||||||
super{
|
super{
|
||||||
std::move(x.h()),std::move(x.pred()),std::move(x.al()),
|
std::move(x.h()),std::move(x.pred()),std::move(x.al()),
|
||||||
arrays_type(arrays_type::new_group_access(
|
arrays_type(arrays_type::new_group_access(
|
||||||
@ -905,7 +907,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
template<typename,typename,typename,typename> friend class concurrent_table;
|
template<typename,typename,typename,typename> friend class concurrent_table;
|
||||||
template<typename,typename,typename,typename> friend class table;
|
|
||||||
|
|
||||||
using mutex_type=rw_spinlock;
|
using mutex_type=rw_spinlock;
|
||||||
using multimutex_type=multimutex<mutex_type,128>; // TODO: adapt 128 to the machine
|
using multimutex_type=multimutex<mutex_type,128>; // TODO: adapt 128 to the machine
|
||||||
|
@ -290,6 +290,9 @@ class table:table_core_impl<TypePolicy,Hash,Pred,Allocator>
|
|||||||
using arrays_type=typename super::arrays_type;
|
using arrays_type=typename super::arrays_type;
|
||||||
using size_ctrl_type=typename super::size_ctrl_type;
|
using size_ctrl_type=typename super::size_ctrl_type;
|
||||||
using locator=typename super::locator;
|
using locator=typename super::locator;
|
||||||
|
using compatible_concurrent_table=
|
||||||
|
concurrent_table<TypePolicy,Hash,Pred,Allocator>;
|
||||||
|
friend class compatible_concurrent_table;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using key_type=typename super::key_type;
|
using key_type=typename super::key_type;
|
||||||
@ -328,7 +331,7 @@ public:
|
|||||||
table(table&& x)=default;
|
table(table&& x)=default;
|
||||||
table(const table& x,const Allocator& al_):super{x,al_}{}
|
table(const table& x,const Allocator& al_):super{x,al_}{}
|
||||||
table(table&& x,const Allocator& al_):super{std::move(x),al_}{}
|
table(table&& x,const Allocator& al_):super{std::move(x),al_}{}
|
||||||
table(concurrent_table<TypePolicy,Hash,Pred,Allocator>&& x):
|
table(compatible_concurrent_table&& x):
|
||||||
table(std::move(x),x.exclusive_access()){}
|
table(std::move(x),x.exclusive_access()){}
|
||||||
~table()=default;
|
~table()=default;
|
||||||
|
|
||||||
@ -503,10 +506,6 @@ public:
|
|||||||
friend bool operator!=(const table& x,const table& y){return !(x==y);}
|
friend bool operator!=(const table& x,const table& y){return !(x==y);}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template<typename,typename,typename,typename> friend class concurrent_table;
|
|
||||||
using compatible_concurrent_table=
|
|
||||||
concurrent_table<TypePolicy,Hash,Pred,Allocator>;
|
|
||||||
|
|
||||||
template<typename ExclusiveLockGuard>
|
template<typename ExclusiveLockGuard>
|
||||||
table(compatible_concurrent_table&& x,ExclusiveLockGuard):
|
table(compatible_concurrent_table&& x,ExclusiveLockGuard):
|
||||||
super{
|
super{
|
||||||
|
Reference in New Issue
Block a user