Skip to content

Commit 7524b2d

Browse files
committed
Rename to MoveOnly
1 parent d14a048 commit 7524b2d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

libcxx/test/std/containers/sequences/vector/vector.modifiers/emplace.pass.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,30 @@
2525
#include "test_allocator.h"
2626
#include "test_macros.h"
2727

28-
struct NonCopyable {
28+
struct MoveOnly {
2929
int i;
3030

31-
TEST_CONSTEXPR_CXX14 explicit NonCopyable(int i) : i(i) {}
31+
TEST_CONSTEXPR_CXX14 explicit MoveOnly(int i) : i(i) {}
3232

33-
NonCopyable(NonCopyable const&) = delete;
34-
NonCopyable& operator=(NonCopyable const&) = delete;
33+
MoveOnly(MoveOnly const&) = delete;
34+
MoveOnly& operator=(MoveOnly const&) = delete;
3535

36-
TEST_CONSTEXPR_CXX14 NonCopyable(NonCopyable&& other) : i(other.i) { other.i = -1; }
36+
TEST_CONSTEXPR_CXX14 MoveOnly(MoveOnly&& other) noexcept : i(other.i) { other.i = -1; }
3737

38-
TEST_CONSTEXPR_CXX14 NonCopyable& operator=(NonCopyable&& other) {
38+
TEST_CONSTEXPR_CXX14 MoveOnly& operator=(MoveOnly&& other) noexcept {
3939
i = other.i;
4040
other.i = -1;
4141
return *this;
4242
}
4343

44-
TEST_CONSTEXPR_CXX14 friend bool operator==(NonCopyable const& lhs, NonCopyable const& rhs) { return lhs.i == rhs.i; }
44+
TEST_CONSTEXPR_CXX14 friend bool operator==(MoveOnly const& lhs, MoveOnly const& rhs) { return lhs.i == rhs.i; }
4545
};
4646

4747
template <class T>
4848
struct has_moved_from_sentinel : std::false_type {};
4949

5050
template <>
51-
struct has_moved_from_sentinel<NonCopyable> : std::true_type {};
51+
struct has_moved_from_sentinel<MoveOnly> : std::true_type {};
5252

5353
template <template <class...> class Allocator, class T>
5454
TEST_CONSTEXPR_CXX20 void test() {
@@ -331,9 +331,9 @@ TEST_CONSTEXPR_CXX20 bool tests() {
331331
test<min_allocator, int>();
332332
test<safe_allocator, int>();
333333

334-
test<std::allocator, NonCopyable>();
335-
test<min_allocator, NonCopyable>();
336-
test<safe_allocator, NonCopyable>();
334+
test<std::allocator, MoveOnly>();
335+
test<min_allocator, MoveOnly>();
336+
test<safe_allocator, MoveOnly>();
337337

338338
test<std::allocator, NonTriviallyRelocatable>();
339339
test<min_allocator, NonTriviallyRelocatable>();

0 commit comments

Comments
 (0)