1
//===----------------------------------------------------------------------===//
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
7
//===----------------------------------------------------------------------===//
13
// is_nothrow_default_constructible<allocator_type>::value &&
14
// is_nothrow_default_constructible<key_compare>::value &&
15
// is_nothrow_copy_constructible<key_compare>::value);
17
// This tests a conforming extension
24
#include "test_macros.h"
26
#include "test_allocator.h"
33
bool operator()(const T&, const T&) const { return false; }
38
#if defined(_LIBCPP_VERSION)
40
typedef std::multiset<MoveOnly> C;
41
static_assert(std::is_nothrow_default_constructible<C>::value, "");
44
typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
45
static_assert(std::is_nothrow_default_constructible<C>::value, "");
47
#endif // _LIBCPP_VERSION
49
typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
50
static_assert(!std::is_nothrow_default_constructible<C>::value, "");
53
typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
54
static_assert(!std::is_nothrow_default_constructible<C>::value, "");