cds  2.3.2
cds::atomicity::empty_item_counter Class Reference

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.
 

Detailed Description

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).


The documentation for this class was generated from the following file:

cds 2.3.2 Developed by Maxim Khizhinsky aka khizmax and other contributors 2007 - 2017
Autogenerated Sun Dec 31 2017 12:10:15 by Doxygen 1.8.13