On Tue, Mar 10, 2015 at 8:28 PM, Niall Douglas
Regarding the move constructor, I am surprised you haven't noticed it can be written in two lines yet. It wouldn't be particularly efficient, but then I didn't ask for the most efficient solution - I asked for a solution which works and is correct. This programming competency test is actually much smaller than it looks as soon as you mentally grok it, and remember that correctness is far more important than efficiency.
Niall, I was pretty confused about the move constructor. Sorry that I
could not achieve what is expected.
Anyways, is this the better and right implementation?
concurrent_unordered_map(concurrent_unordered_map &&old_map)
BOOST_NOEXCEPT :
_hasher(std::move(old_map._hasher)),
_key_equal(std::move(old_map._key_equal)),
_allocator(std::move(old_map._allocator)),
_max_load_factor(std::move(old_map._max_load_factor)),
_min_bucket_capacity(std::move(old_map._min_bucket_capacity)),
_oldbucketit(_oldbuckets.begin())
{
_oldbuckets.fill(nullptr);
typedef decltype(_rehash_lock) rehash_lock_t;
lock_guard