ZXFoundation™ 26h2
Loading...
Searching...
No Matches
lib.rwonce Module Reference

Concepts

concept  lib::rwonce::detail::has_native_uint
concept  lib::rwonce::Word

Data Structures

class  lib::rwonce::cell< T >
struct  lib::rwonce::detail::native_uint< usize >
struct  lib::rwonce::detail::native_uint< 1 >
struct  lib::rwonce::detail::native_uint< 16 >
struct  lib::rwonce::detail::native_uint< 2 >
struct  lib::rwonce::detail::native_uint< 4 >
struct  lib::rwonce::detail::native_uint< 8 >
class  lib::rwonce::ref< T >

Typedefs

using CleanT = std::remove_cv_t<T>
using CleanT = std::remove_cv_t<T>
template<typename T>
using lib::rwonce::detail::native_uint_t = typename native_uint<sizeof(std::remove_cv_t<T>)>::type
using type = u8
using type = u128
using type = u16
using type = u32
using type = u64

Functions

constexpr cell (CleanT init) noexcept
 cell (const cell &)=delete
constexpr auto load () const noexcept -> CleanT
constexpr auto load () const noexcept -> CleanT
constexpr operator CleanT () const noexcept
constexpr operator CleanT () const noexcept
constexpr auto operator= (CleanT val) noexcept -> cell &
cell & operator= (const cell &)=delete
constexpr auto operator= (CleanT val) const noexcept -> const ref &
ref & operator= (const ref &)=delete
template<typename T>
constexpr auto lib::rwonce::read_once (const volatile T &x) noexcept -> std::remove_cv_t< T >
 Read a memory location once without compiler caching or reordering.
template<typename T>
 lib::rwonce::ref (T &) -> ref< T >
constexpr ref (const ref &) noexcept=default
constexpr ref (T &obj) noexcept
template<typename T>
requires (!Word<T>)
constexpr auto lib::rwonce::detail::reject_unsupported_type () -> void
constexpr auto store (CleanT val) noexcept -> void
constexpr auto store (CleanT val) const noexcept -> void
constexpr auto unsafe_ref () const noexcept -> const CleanT &
constexpr auto unsafe_ref () noexcept -> CleanT &
template<typename T>
constexpr auto lib::rwonce::write_once (volatile T &x, std::type_identity_t< std::remove_cv_t< T > > val) noexcept -> void
 Write to a memory location once without compiler elision or reordering.

Files

file  lib/rwonce.cxxm
 C++26 Read-Write Once (Volatile Single-Access) Primitives.