30 Input/output library [input.output]

30.10 File systems [filesystems]

30.10.27 Class path [fs.class.path]

30.10.27.4 path members [fs.path.member]

30.10.27.4.8 path compare [fs.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)).