[all-commits] [llvm/llvm-project] 9243f9: [libc] Add support for C++20 'atomic_ref' type (#1...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Tue Mar 25 11:29:12 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9243f99d17c0165800fd1f2f92c5c975cf702414
https://github.com/llvm/llvm-project/commit/9243f99d17c0165800fd1f2f92c5c975cf702414
Author: Joseph Huber <huberjn at outlook.com>
Date: 2025-03-25 (Tue, 25 Mar 2025)
Changed paths:
M libc/src/__support/CPP/atomic.h
M libc/test/src/__support/CPP/atomic_test.cpp
Log Message:
-----------
[libc] Add support for C++20 'atomic_ref' type (#132302)
Summary:
C++20 introduced an atomic reference type, which more easily wraps
around the standard way of dealing with atomics. Instead of a dedicated
type, it allows you to treat an existing allocation as atomic.
This has no users yet, but I'm hoping to use it when I start finalizing
my GPU allocation interface, as it will need to handle atomic values
in-place that can't be done with placement new. Hopefully this is small
enough that we can just keep it in-tree until it's needed, but I'll
accept holding it here until it has a user.
I added one extension to allow implicit conversion and CTAD.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list