diff options
author | Sven Gothel <[email protected]> | 2022-12-30 13:02:30 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-12-30 13:02:30 +0100 |
commit | ae853a863da0981d913b4d38a2752e17ea6c61db (patch) | |
tree | d452de3bf734887cc8a43e7c064ca725aa6c91d4 | |
parent | 622ef073454dc901e71e7c279b67a22905f2234d (diff) |
C++20: Use C++17/20 compatible std::memory_order* values
-rw-r--r-- | include/jau/io_util.hpp | 2 | ||||
-rw-r--r-- | include/jau/ringbuffer.hpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/jau/io_util.hpp b/include/jau/io_util.hpp index d68c723..74ae97e 100644 --- a/include/jau/io_util.hpp +++ b/include/jau/io_util.hpp @@ -75,7 +75,7 @@ namespace jau::io { /** Operation succeeded. */ SUCCESS = 1 }; - typedef jau::ordered_atomic<async_io_result_t, std::memory_order::memory_order_relaxed> relaxed_atomic_async_io_result_t; + typedef jau::ordered_atomic<async_io_result_t, std::memory_order_relaxed> relaxed_atomic_async_io_result_t; /** * Stream consumer function diff --git a/include/jau/ringbuffer.hpp b/include/jau/ringbuffer.hpp index d661d26..b995313 100644 --- a/include/jau/ringbuffer.hpp +++ b/include/jau/ringbuffer.hpp @@ -191,10 +191,10 @@ class ringbuffer { static constexpr void* voidptr_cast(const_pointer p) { return reinterpret_cast<void*>( const_cast<pointer_mutable>( p ) ); } /** SC atomic integral scalar jau::nsize_t. Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write) */ - typedef ordered_atomic<Size_type, std::memory_order::memory_order_seq_cst> sc_atomic_Size_type; + typedef ordered_atomic<Size_type, std::memory_order_seq_cst> sc_atomic_Size_type; /** Relaxed non-SC atomic integral scalar jau::nsize_t. Memory-Model (MM) only guarantees the atomic value, _no_ sequential consistency (SC) between acquire (read) and release (write). */ - typedef ordered_atomic<Size_type, std::memory_order::memory_order_relaxed> relaxed_atomic_Size_type; + typedef ordered_atomic<Size_type, std::memory_order_relaxed> relaxed_atomic_Size_type; /** * Flagging whether multiple-producer and -consumer are enabled, |