27 Input/output library [input.output]

27.10 File systems [filesystems]

27.10.8 Class path [class.path]

27.10.8.4 path members [path.member]

27.10.8.4.8 path compare [path.compare]

int compare(const path& p) const noexcept;

Returns:

  • A value less than 0, if native() for the elements of *this are lexicographically less than native() for the elements of p; otherwise,

  • a value greater than 0, if native() for the elements of *this are lexicographically greater than native() for the elements of p; otherwise,

  • 0.

Remarks: The elements are determined as if by iteration over the half-open range [begin(), end()) for *this and p.

int compare(const string_type& s) const int compare(basic_string_view<value_type> s) const;

Returns: compare(path(s)).

int compare(const value_type* s) const

Returns: compare(path(s)).