diff --git a/doc/path.htm b/doc/path.htm index 0f16aa0..21d252e 100644 --- a/doc/path.htm +++ b/doc/path.htm @@ -147,7 +147,10 @@ boost/filesystem/path.hpp synopsis
Rationale: The return type of several functions (operator<<, leaf, branch) is const path instead of path to disallow expressions like (p1<<p2) = p3. See Scott Myers, Effective C++, - Item 21.
+ Item 21. Likewise, begin() and end() return const iterator + rather than iterator. This detects non-portable code such as ++pth.begin(), + which will not work if iterator is a non-class type. See next() + and prior() in boost/utility.hpp.For the sake of exposition, class path member functions are described as if the class contains a private member std::vector<std::string> m_name. @@ -262,8 +265,8 @@ the returned string is always unambiguous.
@@ -309,7 +312,7 @@ likely to change.const std::string leaf() const;-Returns:
-is_null() ? string() : m_name.back()Rationale: Return type is
stringrather thanconst +Returns:
+is_null() ? std::string() : m_name.back()Rationale: Return type is
const stringrather thanconst string &to give implementations freedom to avoid maintaining the leaf as a separatestringobject.
© Copyright Beman Dawes, 2002
Revised -01 August, 2002
+02 August, 2002