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 //===----------------------------------------------------------------------===//
12 // multimap& operator=(multimap&& c)
14 // allocator_type::propagate_on_container_move_assignment::value &&
15 // is_nothrow_move_assignable<allocator_type>::value &&
16 // is_nothrow_move_assignable<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"
33 some_comp& operator=(const some_comp&);
34 bool operator()(const T&, const T&) const { return false; }
39 typedef std::pair<const MoveOnly, MoveOnly> V;
41 typedef std::multimap<MoveOnly, MoveOnly> C;
42 static_assert(std::is_nothrow_move_assignable<C>::value, "");
45 typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
46 static_assert(!std::is_nothrow_move_assignable<C>::value, "");
48 #if defined(_LIBCPP_VERSION)
50 typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
51 static_assert(std::is_nothrow_move_assignable<C>::value, "");
53 #endif // _LIBCPP_VERSION
55 typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
56 static_assert(!std::is_nothrow_move_assignable<C>::value, "");