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 //===----------------------------------------------------------------------===//
11 // is_trivially_move_assignable
13 #include <type_traits>
14 #include "test_macros.h"
17 void test_has_trivial_assign()
19 static_assert( std::is_trivially_move_assignable
<T
>::value
, "");
21 static_assert( std::is_trivially_move_assignable_v
<T
>, "");
26 void test_has_not_trivial_assign()
28 static_assert(!std::is_trivially_move_assignable
<T
>::value
, "");
30 static_assert(!std::is_trivially_move_assignable_v
<T
>, "");
52 virtual ~Abstract() = 0;
57 A
& operator=(const A
&);
62 test_has_trivial_assign
<int&>();
63 test_has_trivial_assign
<Union
>();
64 test_has_trivial_assign
<Empty
>();
65 test_has_trivial_assign
<int>();
66 test_has_trivial_assign
<double>();
67 test_has_trivial_assign
<int*>();
68 test_has_trivial_assign
<const int*>();
69 test_has_trivial_assign
<bit_zero
>();
71 test_has_not_trivial_assign
<void>();
72 test_has_not_trivial_assign
<A
>();
73 test_has_not_trivial_assign
<NotEmpty
>();
74 test_has_not_trivial_assign
<Abstract
>();
75 test_has_not_trivial_assign
<const Empty
>();