@@ -39,27 +39,27 @@ struct Throws {
3939
4040bool Throws::sThrows = false ;
4141
42- struct ThrowingMove {
43- TEST_CONSTEXPR ThrowingMove () : value(0 ), do_throw(false ) {}
44- TEST_CONSTEXPR explicit ThrowingMove (int v) : value(v), do_throw(false ) {}
45- TEST_CONSTEXPR explicit ThrowingMove (int v, bool throw_) : value(v), do_throw(throw_) {}
42+ struct ThrowingMoveOnly {
43+ TEST_CONSTEXPR ThrowingMoveOnly () : value(0 ), do_throw(false ) {}
44+ TEST_CONSTEXPR explicit ThrowingMoveOnly (int v) : value(v), do_throw(false ) {}
45+ TEST_CONSTEXPR explicit ThrowingMoveOnly (int v, bool throw_) : value(v), do_throw(throw_) {}
4646
47- ThrowingMove (const ThrowingMove & rhs) = default ;
48- ThrowingMove & operator =(const ThrowingMove &) = default ;
47+ ThrowingMoveOnly (const ThrowingMoveOnly & rhs) = delete ;
48+ ThrowingMoveOnly & operator =(const ThrowingMoveOnly &) = delete ;
4949
50- TEST_CONSTEXPR_CXX14 ThrowingMove (ThrowingMove && rhs) : value(rhs.value), do_throw(rhs.do_throw) {
50+ TEST_CONSTEXPR_CXX14 ThrowingMoveOnly (ThrowingMoveOnly && rhs) : value(rhs.value), do_throw(rhs.do_throw) {
5151 if (do_throw)
5252 throw 1 ;
5353 }
54- TEST_CONSTEXPR_CXX14 ThrowingMove & operator =(ThrowingMove && rhs) {
54+ TEST_CONSTEXPR_CXX14 ThrowingMoveOnly & operator =(ThrowingMoveOnly && rhs) {
5555 value = rhs.value ;
5656 do_throw = rhs.do_throw ;
5757 if (do_throw)
5858 throw 1 ;
5959 return *this ;
6060 }
6161
62- TEST_CONSTEXPR_CXX14 friend bool operator ==(ThrowingMove const & lhs, ThrowingMove const & rhs) {
62+ TEST_CONSTEXPR_CXX14 friend bool operator ==(ThrowingMoveOnly const & lhs, ThrowingMoveOnly const & rhs) {
6363 return lhs.value == rhs.value ;
6464 }
6565
0 commit comments