[#BloombergLP-bsls-AtomicBool] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::AtomicBool :relfileprefix: ../../ :mrdocs: Atomic boolean providing sequentially consistent operations by default. == Synopsis Declared in `<bsls_atomic.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class AtomicBool; ---- == Description This class implements an atomic boolean, which supports common boolean operations in a way that is guaranteed to be atomic. Operations on objects of this class provide the sequential consistency memory ordering guarantee unless explicitly qualified with a less strict consistency guarantee suffix (i.e., Acquire, Release, AcqRel or Relaxed). == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/AtomicBool/2constructor-08.adoc[`AtomicBool`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bsls/AtomicBool/operator_assign.adoc[`operator=`] | Atomically assign the specified `value` to this object, and return a reference offering modifiable access to `this` object. | xref:BloombergLP/bsls/AtomicBool/load.adoc[`load`] | Return the current value of this object. | xref:BloombergLP/bsls/AtomicBool/loadAcquire.adoc[`loadAcquire`] | Return the current value of this object, providing the acquire memory ordering guarantee. | xref:BloombergLP/bsls/AtomicBool/loadRelaxed.adoc[`loadRelaxed`] | Return the current value of this object, providing the relaxed memory ordering guarantee. | xref:BloombergLP/bsls/AtomicBool/store.adoc[`store`] | Atomically assign the specified `value` to this object, providing the sequential consistency memory ordering guarantee. | xref:BloombergLP/bsls/AtomicBool/storeRelaxed.adoc[`storeRelaxed`] | Atomically assign the specified `value` to this object, providing the relaxed memory ordering guarantee. | xref:BloombergLP/bsls/AtomicBool/storeRelease.adoc[`storeRelease`] | Atomically assign the specified `value` to this object, providing the release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicBool/swap.adoc[`swap`] | Atomically set the value of this object to the specified `swapValue` and return its previous value. | xref:BloombergLP/bsls/AtomicBool/swapAcqRel.adoc[`swapAcqRel`] | Atomically set the value of this object to the specified `swapValue` and return its previous value, providing the acquire/release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicBool/testAndSwap.adoc[`testAndSwap`] | Conditionally swap this value if it equals `compareValue`. | xref:BloombergLP/bsls/AtomicBool/testAndSwapAcqRel.adoc[`testAndSwapAcqRel`] | Conditionally swap this value with acquire/release ordering. | xref:BloombergLP/bsls/AtomicBool/2conversion.adoc[`operator bool`] | Return the current value of this object. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#