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 //===----------------------------------------------------------------------===// 8 9 // UNSUPPORTED: c++03 10 11 // <queue> 12 13 // priority_queue() 14 // noexcept(is_nothrow_default_constructible<container_type>::value && 15 // is_nothrow_default_constructible<Compare>::value); 16 17 // This tests a conforming extension 18 19 20 #include <queue> 21 #include <cassert> 22 23 #include "test_macros.h" 24 #include "MoveOnly.h" 25 main(int,char **)26int main(int, char**) 27 { 28 #if defined(_LIBCPP_VERSION) 29 { 30 typedef std::priority_queue<MoveOnly> C; 31 static_assert(std::is_nothrow_default_constructible<C>::value, ""); 32 } 33 #endif 34 35 return 0; 36 } 37