Skip to content

atomic_ref<char> in inline void* atomic_load_per_byte_memcpy should be a atomic_ref<const char> #23

@lbckmnn

Description

@lbckmnn

Hey timur,
I stumbled across your implementation of a seqlock and looked into the bytewise atomic memcpy because I need something similar:

dest_bytes[i] = std::atomic_ref<char>(src_bytes[i]).load(std::memory_order_relaxed);

This does not seem to compile (https://godbolt.org/z/Pa5qjKb3T).
The atomic_ref<char> requires a (non-const) reference.
However, an atomic_ref<const char> seems to be fine in that particular place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions