From 79207756b3a07fec1ff18f842e21fc64a861ebf3 Mon Sep 17 00:00:00 2001
From: Beman Dawes 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.
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