cds
2.3.2
|
Empty item counter. More...
#include <cds/algo/atomic.h>
Public Types | |
typedef size_t | counter_type |
Counter type. | |
Public Member Functions | |
operator counter_type () const | |
Same as value(), always returns 0. | |
counter_type | operator++ () const |
Dummy pre-increment. Always returns 0. | |
counter_type | operator++ (int) const |
Dummy post-increment. Always returns 0. | |
counter_type | operator-- () const |
Dummy pre-decrement. Always returns 0. | |
counter_type | operator-- (int) const |
Dummy post-decrement. Always returns 0. | |
counter_type | operator+= (counter_type count) |
Dummy increment by count , always returns 0. | |
counter_type | operator-= (counter_type count) |
Dummy decrement by count , always returns 0. | |
Static Public Member Functions | |
static counter_type | value (atomics::memory_order=atomics::memory_order_relaxed) |
Returns 0. | |
static counter_type | inc (atomics::memory_order=atomics::memory_order_relaxed) |
Dummy increment. Always returns 0. | |
static counter_type | inc (counter_type, atomics::memory_order=atomics::memory_order_relaxed) |
Dummy increment. Always returns 0. | |
static counter_type | dec (atomics::memory_order=atomics::memory_order_relaxed) |
Dummy increment. Always returns 0. | |
static counter_type | dec (counter_type, atomics::memory_order=atomics::memory_order_relaxed) |
Dummy increment. Always returns 0. | |
static void | reset (atomics::memory_order=atomics::memory_order_relaxed) |
Dummy function. | |
Empty item counter.
This class may be used instead of item_counter when you do not need full item_counter interface. All methods of the class is empty and returns 0.
The object of this class should not be used in data structure that behavior significantly depends on item counting (for example, in many hash map implementation).