Skip to content

Consider use of std::atomic_load and std::atomic_store on shared pointers. #5169

@drebelsky

Description

@drebelsky

Directly calling atomic_load/atomic_store on shared pointers was deprecated in C++20. This usage notably causes warnings in MSVC and GCC. Unfortunately, libc++ does not yet have an implementation for std::atomic<std::shared_ptr<T>>. The use of the overloads is still error-prone, and a brief search suggests that some implementations of atomic_load/store for shared_ptrs may be subpar. It looks like these calls in core were introduced in #5135.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cleanuprefactoring or other internal improvements

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions