1 #ifndef TEST_SUPPORT_EMPLACE_CONSTRUCTIBLE_H
2 #define TEST_SUPPORT_EMPLACE_CONSTRUCTIBLE_H
4 #include "test_macros.h"
8 struct EmplaceConstructible
{
10 TEST_CONSTEXPR_CXX14
explicit EmplaceConstructible(T xvalue
) : value(xvalue
) {}
11 EmplaceConstructible(EmplaceConstructible
const&) = delete;
15 struct EmplaceConstructibleAndMoveInsertable
{
18 TEST_CONSTEXPR_CXX14
explicit EmplaceConstructibleAndMoveInsertable(T xvalue
) : value(xvalue
) {}
20 TEST_CONSTEXPR_CXX14
EmplaceConstructibleAndMoveInsertable(
21 EmplaceConstructibleAndMoveInsertable
&& Other
)
22 : copied(Other
.copied
+ 1), value(std::move(Other
.value
)) {}
26 struct EmplaceConstructibleAndMoveable
{
30 TEST_CONSTEXPR_CXX14
explicit EmplaceConstructibleAndMoveable(T xvalue
) noexcept
: value(xvalue
) {}
32 TEST_CONSTEXPR_CXX14
EmplaceConstructibleAndMoveable(EmplaceConstructibleAndMoveable
&& Other
)
33 noexcept
: copied(Other
.copied
+ 1),
34 value(std::move(Other
.value
)) {}
36 TEST_CONSTEXPR_CXX14 EmplaceConstructibleAndMoveable
&
37 operator=(EmplaceConstructibleAndMoveable
&& Other
) noexcept
{
38 copied
= Other
.copied
;
39 assigned
= Other
.assigned
+ 1;
40 value
= std::move(Other
.value
);
46 struct EmplaceConstructibleMoveableAndAssignable
{
50 TEST_CONSTEXPR_CXX14
explicit EmplaceConstructibleMoveableAndAssignable(T xvalue
) noexcept
53 TEST_CONSTEXPR_CXX14
EmplaceConstructibleMoveableAndAssignable(
54 EmplaceConstructibleMoveableAndAssignable
&& Other
) noexcept
55 : copied(Other
.copied
+ 1),
56 value(std::move(Other
.value
)) {}
58 TEST_CONSTEXPR_CXX14 EmplaceConstructibleMoveableAndAssignable
&
59 operator=(EmplaceConstructibleMoveableAndAssignable
&& Other
) noexcept
{
60 copied
= Other
.copied
;
61 assigned
= Other
.assigned
+ 1;
62 value
= std::move(Other
.value
);
66 TEST_CONSTEXPR_CXX14 EmplaceConstructibleMoveableAndAssignable
& operator=(T xvalue
) {
67 value
= std::move(xvalue
);
74 #endif // TEST_SUPPORT_EMPLACE_CONSTRUCTIBLE_H