Skip to content

Commit

Permalink
Remove comparison operators
Browse files Browse the repository at this point in the history
  • Loading branch information
bugdea1er committed Jan 27, 2024
1 parent 4b0e824 commit be3d84e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions include/tmp/path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tests/directory_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion tests/file_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit be3d84e

Please sign in to comment.