Re: [Boost-bugs] [Boost C++ Libraries] #5702: Filename is returned within quotes instead without

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5702: Filename is returned within quotes instead without
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-07-19 07:31:08


#5702: Filename is returned within quotes instead without
---------------------------------+------------------------------------------
  Reporter: moritz@… | Owner: bemandawes
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: filesystem
   Version: Boost 1.47.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------+------------------------------------------

Comment (by moritz@…):

 If found the origin of the bug: Since filename() returns an object of type
 "path" and the inserter and the extractor of the path object delimit the
 string with double-quotes (see
 http://www.boost.org/doc/libs/1_47_0/libs/filesystem/v3/doc/reference.html
 #path-inserter-extractor) the filename is returned in quotes.

 To avoid this you can use
 {{{#!c++
 std::cout << path("/foo/bar.txt").filename().string(); // outputs
 "bar.txt" without the quotes
 }}}

 Although I don't understand why filename() returns a path object instead
 of a normal string() it would be the easiest to change only the
 description in the reference and leave the code as is.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5702#comment:1>
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:07 UTC