From 25063b4f6d905801effb98ea66a1516e468b3b4a Mon Sep 17 00:00:00 2001 From: catalinvasile Date: Thu, 5 Sep 2024 17:10:28 +0200 Subject: [PATCH] Fixes --- include/tl/abs_path.h | 5 +++++ include/tl/rel_path.h | 5 +++++ test/test_paths.cpp | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/include/tl/abs_path.h b/include/tl/abs_path.h index f7496bf..2883749 100644 --- a/include/tl/abs_path.h +++ b/include/tl/abs_path.h @@ -910,6 +910,11 @@ abs_path operator+(const abs_path_view& a, const abs_p p += b; return p; } +template +bool operator==(const abs_path_view& a, const abs_path& b) noexcept +{ + return b == a; +} } diff --git a/include/tl/rel_path.h b/include/tl/rel_path.h index 7a81555..cd778ef 100644 --- a/include/tl/rel_path.h +++ b/include/tl/rel_path.h @@ -830,6 +830,11 @@ rel_path operator+(const rel_path_view& a, const rel_p p += b; return p; } +template +bool operator==(const rel_path_view& a, const rel_path& b) noexcept +{ + return b == a; +} } diff --git a/test/test_paths.cpp b/test/test_paths.cpp index 47d24c8..33b80ec 100644 --- a/test/test_paths.cpp +++ b/test/test_paths.cpp @@ -784,6 +784,12 @@ UTEST(self_assign_and_append_tests, self_assign_and_append_tests) 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_view pathView = path;