Opened 13 years ago

Closed 13 years ago

#3385 closed Bugs (fixed)

Specifications of bool opeartor==(path, string) is changed.

Reported by: Shuji Yamasaki <shu@…> Owned by: Beman Dawes
Milestone: Boost 1.41.0 Component: filesystem
Version: Boost 1.40.0 Severity: Problem
Keywords: Cc:

Description

Before:
path("c:\\file") == "c:\\file" //true
path("c:\\file") == "c:/file" //true

Current:
path("c:\\file") == "c:\\file" //false
path("c:\\file") == "c:/file" //true

I found the comment in path.hpp:
//  operator == uses string compare rather than !(lhs < rhs) && !(rhs < lhs) because
//  the result is the same yet the direct string compare is much more efficient that
//  lexicographical_compare, and lexicographical_compare used twice at that.

Is it intended?

Change History (1)

comment:1 by Beman Dawes, 13 years ago

Resolution: fixed
Status: newclosed

(In [56139]) Fix #3385, add test cases

Note: See TracTickets for help on using tickets.