[libc++] Move swap test to a .compile.pass.cpp (#143167)

This commit is contained in:
Louis Dionne
2025-06-10 15:22:42 -04:00
committed by GitHub
parent 44b928e0d5
commit 616f83530f

View File

@@ -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;
}