Move libcds 1.6.0 from SVN
[libcds.git] / cds / algo / elimination_opt.h
1 //$$CDS-header$$
2
3 #ifndef __CDS_ALGO_ELIMINATION_OPT_H
4 #define __CDS_ALGO_ELIMINATION_OPT_H
5
6 #include <cds/details/defs.h>
7
8 namespace cds { namespace opt {
9
10     /// Enable \ref cds_elimination_description "elimination back-off" for the container
11     template <bool Enable>
12     struct enable_elimination {
13         //@cond
14         template <class Base> struct pack: public Base
15         {
16             static CDS_CONSTEXPR_CONST bool enable_elimination = Enable;
17         };
18         //@endcond
19     };
20
21     /// \ref cds_elimination_description "Elimination back-off strategy" option setter
22     /**
23         Back-off strategy for elimination.
24         Usually, elimination back-off strategy is \p cds::backoff::delay.
25     */
26     template <typename Type>
27     struct elimination_backoff {
28         //@cond
29         template <class Base> struct pack: public Base
30         {
31             typedef Type elimination_backoff;
32         };
33         //@endcond
34     };
35 }} // namespace cds::opt
36
37 #endif // #ifndef __CDS_ALGO_ELIMINATION_OPT_H