[libcxx-commits] [PATCH] D92196: C++20 comments

Benjamin Trapani via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 26 14:21:28 PST 2020


BenjaminTrapani updated this revision to Diff 307930.
BenjaminTrapani added a comment.

Further rebases


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92196/new/

https://reviews.llvm.org/D92196

Files:
  libcxx/test/std/atomics/atomics.types.generic/assign_to_atomic_ref_deleted.fail.cpp
  libcxx/test/std/atomics/atomics.types.generic/trivially_copyable_ref.fail.cpp


Index: libcxx/test/std/atomics/atomics.types.generic/trivially_copyable_ref.fail.cpp
===================================================================
--- libcxx/test/std/atomics/atomics.types.generic/trivially_copyable_ref.fail.cpp
+++ libcxx/test/std/atomics/atomics.types.generic/trivially_copyable_ref.fail.cpp
@@ -45,9 +45,10 @@
   int i_;
 };
 
-template <class T, class>
+template <class T>
 void test(T t) {
-  std::atomic_ref<T> t0(t);
+  std::atomic_ref<T> t0(
+      t); // expected-error at atomic:* {{static_assert failed due to requirement 'is_trivially_copyable<NotTriviallyCopyable>::value' "std::atomic_ref<_Tp> requires that '_Tp' be a trivially copyable type"}}
 }
 
 int main(int, char**) {
Index: libcxx/test/std/atomics/atomics.types.generic/assign_to_atomic_ref_deleted.fail.cpp
===================================================================
--- libcxx/test/std/atomics/atomics.types.generic/assign_to_atomic_ref_deleted.fail.cpp
+++ libcxx/test/std/atomics/atomics.types.generic/assign_to_atomic_ref_deleted.fail.cpp
@@ -41,7 +41,8 @@
   int val = 1;
   std::atomic_ref<int> t0(val);
   std::atomic_ref<int> t1(val);
-  t0 = t1;
+  t0 =
+      t1; // expected-error {{object of type 'std::atomic_ref<int>' cannot be assigned because its copy assignment operator is implicitly deleted}}
 
   return 0;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92196.307930.patch
Type: text/x-patch
Size: 1332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201126/b1525506/attachment.bin>


More information about the libcxx-commits mailing list