[hwasan] Omit tag check for null pointers (#122206)
[llvm-project.git] / libcxx / test / std / containers / container.adaptors / priority.queue / priqueue.special / swap_noexcept.pass.cpp
blob579ec0aba770887d8207b3a50133fe439afc3e8b
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <queue>
11 // void swap(priority_queue& c)
12 // noexcept(__is_nothrow_swappable<container_type>::value &&
13 // __is_nothrow_swappable<Compare>::value);
15 // This tests a conforming extension
17 // UNSUPPORTED: c++03
19 #include <queue>
20 #include <utility>
21 #include <cassert>
23 #include "test_macros.h"
24 #include "MoveOnly.h"
26 int main(int, char**)
29 typedef std::priority_queue<MoveOnly> C;
30 static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
33 return 0;