From 99aaa0bf8433b4aeb28ef2da2d98cc316fa9e187 Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Mon, 4 Aug 2003 12:16:27 +0000 Subject: [PATCH] clarify operator /= rationale [SVN r19435] --- doc/path.htm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/path.htm b/doc/path.htm index a8d1a6c..b2c1e0c 100644 --- a/doc/path.htm +++ b/doc/path.htm @@ -317,8 +317,9 @@ path( const char * src, path_format );

Postcondition: m_name is in canonical form.

Rationale: It is not considered an error for rhs to - include a root-name because it might relative, and - thus valid.  For example, on Windows, the follow must succeed:

+ include a root-directory because m_name might be relative + or empty, and + thus it is valid for rhs to supply root-directory.  For example, on Windows, the following must succeed:

path p( "c:", native );
 p /= "/foo";
@@ -335,8 +336,9 @@ assert( p.string() == "c:/foo" );
For example, initial_directory() / "src" / test_name. Operator+ and operator+= were considered as alternatives, but deemed too easy to confuse with those operators for std::string. Operator<< and - operator=<< were until during public review it was pointed out that / and /= - matched the generic path syntax.

+ operator=<< were used originally until during public review Dave + Abrahams pointed out that / and /= + match the generic path syntax.

Note: Also see non-member operator/ functions.

@@ -796,7 +798,7 @@ various expressions.


© Copyright Beman Dawes, 2002

Revised -11 June, 2003

+04 August, 2003