File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
libcxx/test/std/containers/sequences/vector/vector.modifiers Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 2626#include " test_macros.h"
2727
2828struct MoveOnly {
29- int i ;
29+ int value ;
3030
31- TEST_CONSTEXPR_CXX14 explicit MoveOnly (int i) : i (i) {}
31+ TEST_CONSTEXPR_CXX14 explicit MoveOnly (int i) : value (i) {}
3232
3333 MoveOnly (MoveOnly const &) = delete ;
3434 MoveOnly& operator =(MoveOnly const &) = delete ;
3535
36- TEST_CONSTEXPR_CXX14 MoveOnly (MoveOnly&& other) noexcept : i (other.i ) { other.i = -1 ; }
36+ TEST_CONSTEXPR_CXX14 MoveOnly (MoveOnly&& other) TEST_NOEXCEPT : value (other.value ) { other.value = -1 ; }
3737
38- TEST_CONSTEXPR_CXX14 MoveOnly& operator =(MoveOnly&& other) noexcept {
39- i = other.i ;
40- other.i = -1 ;
38+ TEST_CONSTEXPR_CXX14 MoveOnly& operator =(MoveOnly&& other) TEST_NOEXCEPT {
39+ value = other.value ;
40+ other.value = -1 ;
4141 return *this ;
4242 }
4343
44- TEST_CONSTEXPR_CXX14 friend bool operator ==(MoveOnly const & lhs, MoveOnly const & rhs) { return lhs.i == rhs.i ; }
44+ TEST_CONSTEXPR_CXX14 friend bool operator ==(MoveOnly const & lhs, MoveOnly const & rhs) {
45+ return lhs.value == rhs.value ;
46+ }
4547};
4648
4749template <class T >
You can’t perform that action at this time.
0 commit comments