[libcxx-commits] [PATCH] D72240: Implement C++20 std::atomic_ref and test

Benjamin Trapani via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jan 5 17:57:57 PST 2020


BenjaminTrapani created this revision.
BenjaminTrapani added reviewers: rjmccall, theraven.
Herald added a reviewer: jfb.
Herald added subscribers: libcxx-commits, jfb, christof.
Herald added a project: libc++.

Implement the atomic ref class by reusing the atomic_base_impl class and friends. Add overloads as required for reference types. The entire spec is tested and working under clang and g++. I could not figure out how to test the implementation falling back to locks (only used in freestanding builds). The additional code there needs to be tested. Should I investigate adding a regression test for freestanding atomic builds?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72240

Files:
  libcxx/include/atomic
  libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
  libcxx/test/std/atomics/atomics.types.generic/address.pass.cpp
  libcxx/test/std/atomics/atomics.types.generic/assign_to_atomic_ref_deleted.fail.cpp
  libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp
  libcxx/test/std/atomics/atomics.types.generic/test_compare_exchange_helpers.h
  libcxx/test/std/atomics/atomics.types.generic/trivially_copyable.pass.cpp
  libcxx/test/std/atomics/atomics.types.generic/trivially_copyable_ref.fail.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72240.236279.patch
Type: text/x-patch
Size: 78456 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200106/d55e2d78/attachment-0001.bin>


More information about the libcxx-commits mailing list