mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Exception of CP.100 refined to include the "sequentially consistent memory model" only
Atomic variables are safe with the sequentially consistent memory model (memory_order_seq_cst) only. Weakly ordered atomics cannot be considered safe for mainstream use. The exception clause of CP.100 refined to include the "sequentially consistent memory model" only. cst added to dictionary For std::memory_order_seq_cst, which is defined in <atomic>.
This commit is contained in:
parent
6767413118
commit
5f66e004d8
|
@ -12570,7 +12570,7 @@ Read up on the ABA problem.
|
||||||
|
|
||||||
##### Exception
|
##### Exception
|
||||||
|
|
||||||
[Atomic variables](#???) can be used simply and safely.
|
[Atomic variables](#???) can be used simply and safely, as long as you are using the sequentially consistent memory model (memory_order_seq_cst), which is the default.
|
||||||
|
|
||||||
##### Note
|
##### Note
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,7 @@ cpp
|
||||||
cpp98
|
cpp98
|
||||||
CppCon
|
CppCon
|
||||||
CRTP
|
CRTP
|
||||||
|
cst
|
||||||
cstdarg
|
cstdarg
|
||||||
cstring
|
cstring
|
||||||
cstylecast
|
cstylecast
|
||||||
|
|
Loading…
Reference in New Issue
Block a user