1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
14 // is_nothrow_default_constructible<allocator_type>::value &&
15 // is_nothrow_default_constructible<key_compare>::value &&
16 // is_nothrow_copy_constructible<key_compare>::value);
18 // This tests a conforming extension
20 // UNSUPPORTED: c++98, c++03
25 #include "test_macros.h"
27 #include "test_allocator.h"
34 bool operator()(const T&, const T&) const { return false; }
39 #if defined(_LIBCPP_VERSION)
41 typedef std::multiset<MoveOnly> C;
42 static_assert(std::is_nothrow_default_constructible<C>::value, "");
45 typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
46 static_assert(std::is_nothrow_default_constructible<C>::value, "");
48 #endif // _LIBCPP_VERSION
50 typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
51 static_assert(!std::is_nothrow_default_constructible<C>::value, "");
54 typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
55 static_assert(!std::is_nothrow_default_constructible<C>::value, "");