From be3d84ea850d5028e4c1c118730cf66ae8038e5c Mon Sep 17 00:00:00 2001 From: bugdea1er Date: Sun, 28 Jan 2024 00:16:06 +0300 Subject: [PATCH] Remove comparison operators --- include/tmp/path.hpp | 8 -------- tests/directory_test.cpp | 2 +- tests/file_test.cpp | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/include/tmp/path.hpp b/include/tmp/path.hpp index f787147..73d4c57 100644 --- a/include/tmp/path.hpp +++ b/include/tmp/path.hpp @@ -56,14 +56,6 @@ class path { const std::filesystem::path* operator->() const noexcept { return std::addressof(this->p); } - - friend bool operator==(const path& lhs, const path& rhs) noexcept { - return lhs.p == rhs.p; - } - - friend bool operator!=(const path& lhs, const path& rhs) noexcept { - return lhs.p != rhs.p; - } }; } // namespace tmp diff --git a/tests/directory_test.cpp b/tests/directory_test.cpp index 8c1c058..9f82cfd 100644 --- a/tests/directory_test.cpp +++ b/tests/directory_test.cpp @@ -35,7 +35,7 @@ TEST(DirectoryTest, CreateMultiple) { const auto snd = tmp::directory(path); ASSERT_TRUE(fs::exists(snd)); - EXPECT_NE(fst, snd); + EXPECT_NE(fs::path(fst), snd); } TEST(DirectoryTest, SubpathTest) { diff --git a/tests/file_test.cpp b/tests/file_test.cpp index 73fbaa0..c2891c9 100644 --- a/tests/file_test.cpp +++ b/tests/file_test.cpp @@ -35,7 +35,7 @@ TEST(FileTest, CreateMultiple) { const auto snd = tmp::file(path); ASSERT_TRUE(fs::exists(snd)); - EXPECT_NE(fst, snd); + EXPECT_NE(fs::path(fst), snd); } TEST(FileTest, MoveConstruction) {