tenno 0.1.0
Loading...
Searching...
No Matches
tenno::atomic< U * > Class Template Reference

#include <atomic.hpp>

Public Types

using value_type = U *
 

Public Member Functions

 atomic () noexcept=default
 
 ~atomic () noexcept=default
 
 atomic (const atomic &)=delete
 
atomicoperator= (const atomic &)=delete
 
atomicoperator= (const atomic &) volatile =delete
 
bool is_lock_free () const noexcept
 
void store (U *desired) noexcept
 
load () noexcept
 
 operator U () noexcept
 
exchange (U *desired) noexcept
 
bool compare_exchange_weak (const U *expected, U *desired) noexcept
 Compare and exchange the value of the atomic object.
 
bool compare_exchange_strong (const U *expected, U *desired) noexcept
 

Data Fields

const bool is_always_lock_free = false
 

Detailed Description

template<typename U>
class tenno::atomic< U * >

Definition at line 118 of file atomic.hpp.

Member Typedef Documentation

◆ value_type

template<typename U >
using tenno::atomic< U * >::value_type = U *

Definition at line 121 of file atomic.hpp.

Constructor & Destructor Documentation

◆ atomic() [1/2]

template<typename U >
tenno::atomic< U * >::atomic ( )
defaultnoexcept

◆ ~atomic()

template<typename U >
tenno::atomic< U * >::~atomic ( )
defaultnoexcept

◆ atomic() [2/2]

template<typename U >
tenno::atomic< U * >::atomic ( const atomic< U * > & )
delete

Member Function Documentation

◆ compare_exchange_strong()

template<typename U >
bool tenno::atomic< U * >::compare_exchange_strong ( const U * expected,
U * desired )
inlinenoexcept

Definition at line 177 of file atomic.hpp.

◆ compare_exchange_weak()

template<typename U >
bool tenno::atomic< U * >::compare_exchange_weak ( const U * expected,
U * desired )
inlinenoexcept

Compare and exchange the value of the atomic object.

Parameters
expectedThe expected value
desiredThe desired value
Returns
true if the exchange was successful, false otherwise

Definition at line 166 of file atomic.hpp.

◆ exchange()

template<typename U >
U tenno::atomic< U * >::exchange ( U * desired)
inlinenoexcept

Definition at line 152 of file atomic.hpp.

◆ is_lock_free()

template<typename U >
bool tenno::atomic< U * >::is_lock_free ( ) const
inlinenoexcept

Definition at line 130 of file atomic.hpp.

◆ load()

template<typename U >
U tenno::atomic< U * >::load ( )
inlinenoexcept

Definition at line 141 of file atomic.hpp.

◆ operator U()

template<typename U >
tenno::atomic< U * >::operator U ( )
inlinenoexcept

Definition at line 147 of file atomic.hpp.

◆ operator=() [1/2]

template<typename U >
atomic & tenno::atomic< U * >::operator= ( const atomic< U * > & ) volatile
delete

◆ operator=() [2/2]

template<typename U >
atomic & tenno::atomic< U * >::operator= ( const atomic< U * > & )
delete

◆ store()

template<typename U >
void tenno::atomic< U * >::store ( U * desired)
inlinenoexcept

Definition at line 135 of file atomic.hpp.

Field Documentation

◆ is_always_lock_free

template<typename U >
const bool tenno::atomic< U * >::is_always_lock_free = false

Definition at line 122 of file atomic.hpp.


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