Skip to content

Commit

Permalink
Export each of the memory_order enumerators
Browse files Browse the repository at this point in the history
The lib/atomic.h exports memory_order enum into the global namespace,
but none of its enumerators. According to Section 7.3.3 "The using
declaration" of the C++ standard: "specifying an enumeration name
in a using-declaration does not declare its enumerators in
the using-declaration's declarative region." See also:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0943r1.html

Signed-off-by: Sergei Korneichuk <[email protected]>
  • Loading branch information
kernelchuk authored and arnopo committed Aug 21, 2023
1 parent f2144b1 commit 548f642
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
# include <atomic>
using std::atomic_flag;
using std::memory_order;
using std::memory_order_relaxed;
using std::memory_order_consume;
using std::memory_order_acquire;
using std::memory_order_release;
using std::memory_order_acq_rel;
using std::memory_order_seq_cst;

using std::atomic_bool;
using std::atomic_char;
Expand Down

0 comments on commit 548f642

Please sign in to comment.