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 // priority_queue()
13 //        noexcept(is_nothrow_default_constructible<container_type>::value &&
14 //                 is_nothrow_default_constructible<Compare>::value);
15 
16 // This tests a conforming extension
17 
18 #include <queue>
19 #include <cassert>
20 
21 #include "MoveOnly.h"
22 
main()23 int main()
24 {
25 #if __has_feature(cxx_noexcept)
26     {
27         typedef std::priority_queue<MoveOnly> C;
28         static_assert(std::is_nothrow_default_constructible<C>::value, "");
29     }
30 #endif
31 }
32