mirror of
https://github.com/boostorg/unordered.git
synced 2025-11-02 16:51:39 +01:00
Add ExecutionPolicy overload of erase_if
This commit is contained in:
@@ -41,6 +41,23 @@
|
||||
namespace boost{
|
||||
namespace unordered{
|
||||
namespace detail{
|
||||
|
||||
#if defined(BOOST_UNORDERED_PARALLEL_ALGORITHMS)
|
||||
|
||||
template<typename ExecutionPolicy>
|
||||
using is_execution_policy=std::is_execution_policy<
|
||||
typename std::remove_cv<
|
||||
typename std::remove_reference<ExecutionPolicy>::type
|
||||
>::type
|
||||
>;
|
||||
|
||||
#else
|
||||
|
||||
template<typename ExecutionPolicy>
|
||||
using is_execution_policy=std::false_type;
|
||||
|
||||
#endif
|
||||
|
||||
namespace foa{
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
@@ -277,18 +294,6 @@ class concurrent_table:
|
||||
using super::N;
|
||||
using prober=typename super::prober;
|
||||
|
||||
#if defined(BOOST_UNORDERED_PARALLEL_ALGORITHMS)
|
||||
template<typename ExecutionPolicy>
|
||||
using is_execution_policy=std::is_execution_policy<
|
||||
typename std::remove_cv<
|
||||
typename std::remove_reference<ExecutionPolicy>::type
|
||||
>::type
|
||||
>;
|
||||
#else
|
||||
template<typename ExecutionPolicy>
|
||||
using is_execution_policy=std::false_type;
|
||||
#endif
|
||||
|
||||
public:
|
||||
using key_type=typename super::key_type;
|
||||
using init_type=typename super::init_type;
|
||||
@@ -1060,7 +1065,7 @@ private:
|
||||
last=first+this->arrays.groups_size_mask+1;
|
||||
std::for_each(std::forward<ExecutionPolicy>(policy),first,last,
|
||||
[&,this](group_type& g){
|
||||
std::size_t pos=&g-first;
|
||||
std::size_t pos=static_cast<std::size_t>(&g-first);
|
||||
auto p=this->arrays.elements+pos*N;
|
||||
auto lck=access(access_mode,pos);
|
||||
auto mask=this->match_really_occupied(&g,last);
|
||||
|
||||
Reference in New Issue
Block a user