X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=cds%2Fintrusive%2Fmichael_set.h;h=c1daccfc60febc808ab44da0d6613f7168b437b8;hb=51494783145ce52907dcb85e362629830ba46a97;hp=8e21f85f7fe5213fdd4845810d3cbbf8534b88cd;hpb=d15c6730bbd5f63f903496277939b7fe18ac9853;p=libcds.git diff --git a/cds/intrusive/michael_set.h b/cds/intrusive/michael_set.h index 8e21f85f..c1daccfc 100644 --- a/cds/intrusive/michael_set.h +++ b/cds/intrusive/michael_set.h @@ -271,10 +271,6 @@ namespace cds { namespace intrusive { // GC and OrderedList::gc must be the same static_assert(std::is_same::value, "GC and OrderedList::gc must be the same"); - // atomicity::empty_item_counter is not allowed as a item counter - static_assert(!std::is_same::value, - "cds::atomicity::empty_item_counter is not allowed as a item counter"); - protected: //@cond typedef typename ordered_list::template select_stat_wrapper< typename ordered_list::stat > bucket_stat; @@ -929,8 +925,8 @@ namespace cds { namespace intrusive { /// Checks if the set is empty /** - Emptiness is checked by item counting: if item count is zero then the set is empty. - Thus, the correct item counting feature is an important part of Michael's set implementation. + @warning If you use \p atomicity::empty_item_counter in \p traits::item_counter, + the function always returns \p true. */ bool empty() const { @@ -938,6 +934,10 @@ namespace cds { namespace intrusive { } /// Returns item count in the set + /** + If you use \p atomicity::empty_item_counter in \p traits::item_counter, + the function always returns 0. + */ size_t size() const { return m_ItemCounter;