Re: [Boost-bugs] [Boost C++ Libraries] #4329: filesystem::basename is completely erratic

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4329: filesystem::basename is completely erratic
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-24 19:19:57


#4329: filesystem::basename is completely erratic
---------------------------------------------+------------------------
  Reporter: Richard B. Kreckel <kreckel@…> | Owner: bemandawes
      Type: Bugs | Status: closed
 Milestone: Boost 1.43.0 | Component: filesystem
   Version: Boost 1.44.0 | Severity: Problem
Resolution: fixed | Keywords:
---------------------------------------------+------------------------
Changes (by bemandawes):

 * status: new => closed
 * resolution: => fixed

Comment:

 Sorry for the delay in closing this issue. The function is now a member of
 path, and has been renamed `stem()`. The actual problem was fixed years
 ago.

 A reworked version of the test program was tested against the current
 version of the library:

 {{{
 #include <iostream>
 #include <boost/filesystem.hpp>
 using boost::filesystem::path;

 int main()
 {
   std::cout << path("a").stem() << std::endl;
   std::cout << path("a/").stem() << std::endl;
   std::cout << path("a/b").stem() << std::endl;
   std::cout << path("a/b/").stem() << std::endl;
   std::cout << path("a/b/c").stem() << std::endl;
   std::cout << path("a/b/c/").stem() << std::endl;
   std::cout << path("a/b/c/d").stem() << std::endl;
   std::cout << path("a/b/c/d/").stem() << std::endl;
   std::cout << path("a/b/c/d/e").stem() << std::endl;
   std::cout << path("a/b/c/d/e/").stem() << std::endl;
   return 0;
 }
 }}}

 Output:

 {{{
 "a"
 "."
 "b"
 "."
 "c"
 "."
 "d"
 "."
 "e"
 "."
 }}}

 That is the expected output according to the C++ Filesystem TS, which is
 now the base document for boost.filesystem.

 Thanks,

 --Beman

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4329#comment:2>
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:17 UTC