userver: utils::statistics::RelaxedCounter< T > Class Template Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
utils::statistics::RelaxedCounter< T > Class Template Referencefinal

Atomic counter of type T with relaxed memory ordering. More...

#include <userver/utils/statistics/relaxed_counter.hpp>

Public Types

using ValueType = T
 

Public Member Functions

constexpr RelaxedCounter (T desired) noexcept
 
 RelaxedCounter (const RelaxedCounter &other) noexcept
 
RelaxedCounteroperator= (const RelaxedCounter &other) noexcept
 
RelaxedCounteroperator= (T desired) noexcept
 
void Store (T desired) noexcept
 
Load () const noexcept
 
 operator T () const noexcept
 
RelaxedCounteroperator++ () noexcept
 
operator++ (int) noexcept
 
RelaxedCounteroperator-- () noexcept
 
operator-- (int) noexcept
 
RelaxedCounteroperator+= (T arg) noexcept
 
RelaxedCounteroperator-= (T arg) noexcept
 

Detailed Description

template<class T>
class utils::statistics::RelaxedCounter< T >

Atomic counter of type T with relaxed memory ordering.

Definition at line 16 of file relaxed_counter.hpp.

Member Typedef Documentation

◆ ValueType

template<class T >
using utils::statistics::RelaxedCounter< T >::ValueType = T

Definition at line 18 of file relaxed_counter.hpp.

Constructor & Destructor Documentation

◆ RelaxedCounter() [1/2]

template<class T >
constexpr utils::statistics::RelaxedCounter< T >::RelaxedCounter ( desired)
inlineconstexprnoexcept

Definition at line 21 of file relaxed_counter.hpp.

◆ RelaxedCounter() [2/2]

template<class T >
utils::statistics::RelaxedCounter< T >::RelaxedCounter ( const RelaxedCounter< T > &  other)
inlinenoexcept

Definition at line 23 of file relaxed_counter.hpp.

Member Function Documentation

◆ Load()

template<class T >
T utils::statistics::RelaxedCounter< T >::Load ( ) const
inlinenoexcept

Definition at line 41 of file relaxed_counter.hpp.

◆ operator T()

template<class T >
utils::statistics::RelaxedCounter< T >::operator T ( ) const
inlinenoexcept

Definition at line 43 of file relaxed_counter.hpp.

◆ operator++() [1/2]

template<class T >
RelaxedCounter & utils::statistics::RelaxedCounter< T >::operator++ ( )
inlinenoexcept

Definition at line 45 of file relaxed_counter.hpp.

◆ operator++() [2/2]

template<class T >
T utils::statistics::RelaxedCounter< T >::operator++ ( int  )
inlinenoexcept

Definition at line 50 of file relaxed_counter.hpp.

◆ operator+=()

template<class T >
RelaxedCounter & utils::statistics::RelaxedCounter< T >::operator+= ( arg)
inlinenoexcept

Definition at line 63 of file relaxed_counter.hpp.

◆ operator--() [1/2]

template<class T >
RelaxedCounter & utils::statistics::RelaxedCounter< T >::operator-- ( )
inlinenoexcept

Definition at line 54 of file relaxed_counter.hpp.

◆ operator--() [2/2]

template<class T >
T utils::statistics::RelaxedCounter< T >::operator-- ( int  )
inlinenoexcept

Definition at line 59 of file relaxed_counter.hpp.

◆ operator-=()

template<class T >
RelaxedCounter & utils::statistics::RelaxedCounter< T >::operator-= ( arg)
inlinenoexcept

Definition at line 68 of file relaxed_counter.hpp.

◆ operator=() [1/2]

template<class T >
RelaxedCounter & utils::statistics::RelaxedCounter< T >::operator= ( const RelaxedCounter< T > &  other)
inlinenoexcept

Definition at line 25 of file relaxed_counter.hpp.

◆ operator=() [2/2]

template<class T >
RelaxedCounter & utils::statistics::RelaxedCounter< T >::operator= ( desired)
inlinenoexcept

Definition at line 32 of file relaxed_counter.hpp.

◆ Store()

template<class T >
void utils::statistics::RelaxedCounter< T >::Store ( desired)
inlinenoexcept

Definition at line 37 of file relaxed_counter.hpp.


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