diff --git a/include/boost/unordered/detail/foa/concurrent_table.hpp b/include/boost/unordered/detail/foa/concurrent_table.hpp index 7be7218e..550a3e28 100644 --- a/include/boost/unordered/detail/foa/concurrent_table.hpp +++ b/include/boost/unordered/detail/foa/concurrent_table.hpp @@ -980,7 +980,7 @@ private: struct group_shared_lock_guard { group_shared_lock_guard(epoch_type& e_):e{e_}{++e;} - ~group_shared_lock_guard(){++e;} + ~group_shared_lock_guard(){--e;} epoch_type& e; }; @@ -989,7 +989,7 @@ private: group_exclusive_lock_guard( epoch_type& e_,group_access::exclusive_lock_guard&& lck_): e{e_},lck{std::move(lck_)}{++e;} - ~group_exclusive_lock_guard(){++e;} + ~group_exclusive_lock_guard(){--e;} epoch_type& e; group_access::exclusive_lock_guard lck; @@ -1820,16 +1820,12 @@ private: mutable multimutex_type mutexes; #if defined(BOOST_UNORDERED_LATCH_FREE) - static epoch_array epochs; + mutable epoch_array epochs; - static void wait_for_epochs() + void wait_for_epochs() { for(std::size_t i=0;i std::atomic concurrent_table::thread_counter={}; -#if defined(BOOST_UNORDERED_LATCH_FREE) -template -typename concurrent_table::epoch_array -concurrent_table::epochs={}; -#endif - #if defined(BOOST_MSVC) #pragma warning(pop) /* C4714 */ #endif