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:

  • Значение меньше 0, если native() для элементов *this лексикографически меньше, чем native() для элементов p; иначе,

  • значение больше 0, если native() для элементов *this лексикографически больше, чем native() для элементов p; иначе,

  • 0.

Remarks: Элементы определяются как бы итерацией в полуоткрытом диапазоне [begin(), end()) для *this и 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)).