replace null_ptr<>() with nullptr
[libcds.git] / cds / algo / elimination_tls.h
1 //$$CDS-header$$
2
3 #ifndef __CDS_ALGO_ELIMINATION_TLS_H
4 #define __CDS_ALGO_ELIMINATION_TLS_H
5
6 #include <cds/algo/base.h>
7
8 namespace cds { namespace algo { namespace elimination {
9
10     // Forwards
11     struct operation_desc;
12
13     /// Per-thread elimination record
14     /** @headerfile cds/algo/elimination.h
15     */
16     struct record
17     {
18         operation_desc *    pOp ;   ///< Operation descriptor
19
20         /// Initialization
21         record()
22             : pOp( nullptr )
23         {}
24
25         /// Checks if the record is free
26         bool is_free() const
27         {
28             return pOp == nullptr;
29         }
30     };
31
32 }}} // cds::algo::elimination
33
34 #endif // #ifndef __CDS_ALGO_ELIMINATION_TLS_H