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#include <queue>
20#include <cassert>
21
22#include "test_macros.h"
23#include "MoveOnly.h"
24
25int main(int, char**) {
26#if defined(_LIBCPP_VERSION)
27 {
28 typedef std::priority_queue<MoveOnly> C;
29 static_assert(std::is_nothrow_default_constructible<C>::value, "");
30 }
31#endif
32
33 return 0;
34}
35

source code of libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp