From: Mike Krinkin Date: Sat, 28 Mar 2015 06:43:31 +0000 (+0300) Subject: Add equal_to/sort options to nonintrusive trait. X-Git-Tag: v2.1.0~293^2^2~11 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=49a4821e17e746735168fe56fcc5f05dd1e52b1a;p=libcds.git Add equal_to/sort options to nonintrusive trait. Nonintrusive list uses intrusive list as backend, so it is required to not break the build. --- diff --git a/cds/container/details/lazy_list_base.h b/cds/container/details/lazy_list_base.h index 74fede7b..ad0ad2a8 100644 --- a/cds/container/details/lazy_list_base.h +++ b/cds/container/details/lazy_list_base.h @@ -34,6 +34,20 @@ namespace cds { namespace container { */ typedef opt::none less; + /// Specifies binary functor used for comparing keys for equality + /** + No default functor is provided. If \p equal_to option is not spcified, \p compare is used, if \p compare is not + specified, \p less is used. + */ + typedef opt::none equal_to; + + /// Specifies list ordering policy. + /** + If \p sort is \p true, than list maintains items in sorted order, otherwise items are unordered. Default is \p true. + Note that if \p sort is \p falsem than lookup operations scan entire list. + */ + static const bool sort = true; + /// Lock type used to lock modifying items /** Default is cds::sync::spin @@ -76,6 +90,9 @@ namespace cds { namespace container { - \p opt::compare - key compare functor. No default functor is provided. If the option is not specified, the \p opt::less is used. - \p opt::less - specifies binary predicate used for key compare. Default is \p std::less. + - \p opt::equal_to - specifies binary functor for comparing keys for equality. No default is provided. If \p equal_to is + not specified, \p compare is used, if \p compare is not specified, \p less is used. + - \p opt::sort - specifies ordering policy. Default value is \p true. - \p opt::back_off - back-off strategy used. If the option is not specified, \p cds::backoff::Default is used. - \p opt::item_counter - the type of item counting feature. Default is disabled (\p atomicity::empty_item_counter). To enable item counting use \p atomicity::item_counter.