Added path views for abs and rel paths #6

Merged
jeanlemotan merged 2 commits from cv_path_view into main 2024-09-05 17:10:56 +02:00
3 changed files with 16 additions and 0 deletions
Showing only changes of commit 25063b4f6d - Show all commits
+5
View File
@@ -910,6 +910,11 @@ abs_path<PathSystems> operator+(const abs_path_view<PathSystems>& a, const abs_p
p += b; p += b;
return p; return p;
} }
template<class PathSystems>
bool operator==(const abs_path_view<PathSystems>& a, const abs_path<PathSystems>& b) noexcept
{
return b == a;
}
} }
+5
View File
@@ -830,6 +830,11 @@ rel_path<PathSystems> operator+(const rel_path_view<PathSystems>& a, const rel_p
p += b; p += b;
return p; return p;
} }
template<class PathSystems>
bool operator==(const rel_path_view<PathSystems>& a, const rel_path<PathSystems>& b) noexcept
{
return b == a;
}
} }
+6
View File
@@ -784,6 +784,12 @@ UTEST(self_assign_and_append_tests, self_assign_and_append_tests)
UTEST(PathView, PathView) UTEST(PathView, PathView)
{ {
{
//test_abs_path path;
//test_abs_path_view pathView = test_abs_path();
//test_abs_path_view pathView = path;
//pathView.str();
}
{ {
test_abs_path path; test_abs_path path;
test_abs_path_view pathView = path; test_abs_path_view pathView = path;