]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp
Vendor import of libc++ trunk r300422:
[FreeBSD/FreeBSD.git] / test / std / containers / container.adaptors / queue / queue.cons / move_noexcept.pass.cpp
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // <queue>
11
12 // queue(queue&&)
13 //        noexcept(is_nothrow_move_constructible<container_type>::value);
14
15 // This tests a conforming extension
16
17 // UNSUPPORTED: c++98, c++03
18
19 #include <queue>
20 #include <cassert>
21
22 #include "test_macros.h"
23 #include "MoveOnly.h"
24
25 int main()
26 {
27 #if defined(_LIBCPP_VERSION)
28     {
29         typedef std::queue<MoveOnly> C;
30         static_assert(std::is_nothrow_move_constructible<C>::value, "");
31     }
32 #endif // _LIBCPP_VERSION
33 }