Boost logo

Boost :

Subject: Re: [boost] [Boost-commit] svn:boost r62919 - in trunk: boost/filesystem/v2 boost/filesystem/v3 libs/filesystem/v2/test libs/filesystem/v3/test
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2010-06-13 13:47:01


On 13 June 2010 10:33, <bdawes_at_[hidden]> wrote:
> Author: bemandawes
> Date: 2010-06-13 13:33:39 EDT (Sun, 13 Jun 2010)
> New Revision: 62919
> URL: http://svn.boost.org/trac/boost/changeset/62919
>
> [...]
>
> @@ -620,7 +620,7 @@
>         basic_path< String, Traits > & ph )
>     {
>       String str;
> -      is >> str;
> +      std::getline(is, str);  // See ticket 3863
>       ph = str;
>       return is;
>     }
>

I'm not convinced this is the right approach here, since

    cout << mypath << ' ' << myint;

doesn't roundtrip with

    cin >> mypath >> myint;

the way I expect operator<< and operator>> to work.

Perhaps the portable pathname grammar could be extended to allow
backslash-escaping of spaces and backslashes? That or remove the
stream operators entirely and force people to choose which way they
want to print the path and deal with the result as a fully-general
string.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk