[libcxx-commits] [libcxx] 616f835 - [libc++] Move swap test to a .compile.pass.cpp (#143167)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 10 12:22:46 PDT 2025
Author: Louis Dionne
Date: 2025-06-10T15:22:42-04:00
New Revision: 616f83530f0215d077ad11d0a09faf62fa2daf5f
URL: https://github.com/llvm/llvm-project/commit/616f83530f0215d077ad11d0a09faf62fa2daf5f
DIFF: https://github.com/llvm/llvm-project/commit/616f83530f0215d077ad11d0a09faf62fa2daf5f.diff
LOG: [libc++] Move swap test to a .compile.pass.cpp (#143167)
Added:
libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.compile.pass.cpp
Modified:
Removed:
libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
################################################################################
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.compile.pass.cpp
similarity index 98%
rename from libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
rename to libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.compile.pass.cpp
index b83ec3c3c1210..b50e67589471d 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.compile.pass.cpp
@@ -52,7 +52,7 @@ struct some_alloc2 {
typedef std::true_type is_always_equal;
};
-int main(int, char**) {
+void f() {
{
typedef std::forward_list<MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -83,6 +83,4 @@ int main(int, char**) {
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
#endif
-
- return 0;
}
More information about the libcxx-commits
mailing list