lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master f767cd4 17/33: Fix defect introduced 20190527


From: Greg Chicares
Subject: [lmi-commits] [lmi] master f767cd4 17/33: Fix defect introduced 20190527T1635Z: erroneous documentation
Date: Mon, 3 May 2021 08:15:53 -0400 (EDT)

branch: master
commit f767cd462bdb0593c1dfbbeed79b6b763205a63a
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Fix defect introduced 20190527T1635Z: erroneous documentation
    
    Prepending "fs::" removes a possible source of confusion:
    
    -///   path file("/bin/sh";
    -///   path dir ("/usr/bin");
    +///   fs::path file("/bin/sh";
    +///   fs::path dir ("/usr/bin");
    
    The error in commit eb43e2883951 was:
    
    -///   dir / path; // returns "/bin/sh"
    +///   dir / file; // returns "/bin/sh"
                 ^^^^
---
 path_utility.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/path_utility.cpp b/path_utility.cpp
index 0228f4c..7a2657a 100644
--- a/path_utility.cpp
+++ b/path_utility.cpp
@@ -37,9 +37,9 @@
 /// Change '/path/to/file' to '/some/other/place/file'.
 ///
 /// Motivation: It is anomalous that std::filesystem permits this:
-///   path file("/bin/sh";
-///   path dir ("/usr/bin");
-///   dir / path; // returns "/bin/sh"
+///   fs::path file("/bin/sh";
+///   fs::path dir ("/usr/bin");
+///   dir / file; // returns "/bin/sh"
 /// where true == file.is_absolute().
 ///
 /// Arguably the arguments should be given in the opposite order:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]