[Boost-bugs] [Boost C++ Libraries] #4065: Boost Filesystem lexicographic path comparison inconsistent

Subject: [Boost-bugs] [Boost C++ Libraries] #4065: Boost Filesystem lexicographic path comparison inconsistent
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-04-04 15:15:11


#4065: Boost Filesystem lexicographic path comparison inconsistent
-----------------------------------------------+----------------------------
 Reporter: dbetz@… | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: filesystem
  Version: Boost Development Trunk | Severity: Showstopper
 Keywords: filesystem, lexicographic_compare |
-----------------------------------------------+----------------------------
 I am using boost svn number 60558. Briefly, paths "/foo/" and "/foo/." are
 not <, >, or ==:

 #include <iostream>

 #include <boost/filesystem.hpp>

 int main(int argc, char *argv[]){
         boost::filesystem::path p("/foo/");
         boost::filesystem::path q("/foo/.");
         if (p<q)
                 std::cerr << p << " < " << q << std::endl;
         else if (p==q)
                 std::cerr << p << " == " << q << std::endl;
         else if (p>q)
                 std::cerr << p << " > " << q << std::endl;
         else
                 std::cerr << p << " ? " << q << std::endl;
 }

 gives the following output:

 /foo/ ? /foo/.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4065>
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