[libcxx-commits] [PATCH] D144629: [libc++] Implement LWG-3204 sub_match::swap only swaps the base class

Jakub Mazurkiewicz via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 23 06:51:15 PST 2023


JMazurkiewicz added inline comments.


================
Comment at: libcxx/test/std/re/re.submatch/re.submatch.members/swap.pass.cpp:20
+
+#define STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
+
----------------
Both uses of this macro test if operation is `noexcept` - we can replace it with `ASSERT_NOEXCEPT` macro (https://github.com/llvm/llvm-project/blob/6c82d16d6092302c0d90ccb672a6ceba0b4a84d2/libcxx/test/support/test_macros.h#L219-L228).


================
Comment at: libcxx/test/std/re/re.submatch/re.submatch.members/swap.pass.cpp:45
+
+        STATIC_ASSERT(noexcept(sm1.swap(sm2)));
+    }
----------------



================
Comment at: libcxx/test/std/re/re.submatch/re.submatch.members/swap.pass.cpp:69
+
+        STATIC_ASSERT(noexcept(sm1.swap(sm2)));
+    }
----------------



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

https://reviews.llvm.org/D144629



More information about the libcxx-commits mailing list