Subject: [Boost-bugs] [Boost C++ Libraries] #3863: A filesystem::path object cannot be extracted from a stream if the path contain a space
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-01-26 16:45:21
#3863: A filesystem::path object cannot be extracted from a stream if the path
contain a space
-----------------------------------+----------------------------------------
Reporter: dgoncharov@⦠| Owner: bemandawes
Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: filesystem
Version: Boost 1.42.0 | Severity: Problem
Keywords: |
-----------------------------------+----------------------------------------
e.g.
{{{
filesystem::path p;
cin >> p;
}}}
If the user enters "asdf asdf" the operator>>() will extract chars until
the first space and the path'll be "asdf".
Replacing
{{{
is >> str;
}}}
in the implementation of operator>>()
with
{{{
std::getline(is, str);
}}}
fixes the problem.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3863> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC