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 // template <class T1, class T2> struct pair
14 // pair(pair const&) = default;
15 // pair(pair&&) = default;
17 // Doesn't pass due to use of is_trivially_* trait.
23 #include "test_macros.h"
26 Dummy(Dummy const&) = delete;
27 Dummy(Dummy &&) = default;
32 typedef std::pair<int, short> P;
34 static_assert(std::is_copy_constructible<P>::value, "");
35 #if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
36 static_assert(std::is_trivially_copy_constructible<P>::value, "");
39 #if TEST_STD_VER >= 11
41 static_assert(std::is_move_constructible<P>::value, "");
42 #if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
43 static_assert(std::is_trivially_move_constructible<P>::value, "");
47 using P1 = std::pair<Dummy, int>;
48 static_assert(!std::is_copy_constructible<P1>::value, "");
49 static_assert(!std::is_trivially_copy_constructible<P1>::value, "");
50 static_assert(std::is_move_constructible<P1>::value, "");
51 #if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
52 static_assert(std::is_trivially_move_constructible<P1>::value, "");