fix swap tests

This commit is contained in:
Andrzej Krzemienski
2024-10-17 00:21:26 +02:00
parent 5e7fdf5ec5
commit 86f3288312

View File

@ -31,10 +31,10 @@ struct Guard
std::string str; std::string str;
Guard() : num() {} Guard() : num() {}
Guard(double num_, std::string str_) : num(num_), str(str_) {} Guard(double num_, std::string str_) : num(num_), str(str_) {}
friend bool operator==(const Guard& lhs, const Guard& rhs) { return lhs.num == rhs.num && lhs.str == rhs.str; } friend bool operator==(const Guard& lhs, const Guard& rhs) { return lhs.num == rhs.num && lhs.str == rhs.str; }
friend bool operator!=(const Guard& lhs, const Guard& rhs) { return !(lhs == rhs); } friend bool operator!=(const Guard& lhs, const Guard& rhs) { return !(lhs == rhs); }
private: private:
Guard(const Guard&); Guard(const Guard&);
Guard& operator=(const Guard&); Guard& operator=(const Guard&);
@ -50,4 +50,4 @@ int main()
NOTHING_TO_TEST_SO_JUST_FAIL NOTHING_TO_TEST_SO_JUST_FAIL
#endif #endif
return 0; return 0;
} }