Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      operator==,!=,<,<=,>,>=(std::experimental::filesystem::path)

      From cppreference.com
      <cpp‎ |experimental‎ |fs‎ |path
       
       
       
      Filesystem library
      Classes
      Functions
      File types
       
      path
      Member functions
      Path decomposition
      Non-member functions
      operator==operator!=operator<operator<=operator>operator>=
       
      bool operator==(const path& lhs,const path& rhs);
      (1)(filesystem TS)
      bool operator!=(const path& lhs,const path& rhs);
      (2)(filesystem TS)
      bool operator<(const path& lhs,const path& rhs);
      (3)(filesystem TS)
      bool operator<=(const path& lhs,const path& rhs);
      (4)(filesystem TS)
      bool operator>(const path& lhs,const path& rhs);
      (5)(filesystem TS)
      bool operator>=(const path& lhs,const path& rhs);
      (6)(filesystem TS)

      Compares two paths lexicographically.

      1) Checks whetherlhs andrhs are equal. Equivalent to!(lhs< rhs)&&!(rhs< lhs).
      2) Checks whetherlhs andrhs are not equal. Equivalent to!(lhs== rhs).
      3) Checks whetherlhs is less thanrhs. Equivalent tolhs.compare(rhs)<0.
      4) Checks whetherlhs is less than or equal torhs. Equivalent to!(rhs< lhs).
      5) Checks whetherlhs is greater thanrhs. Equivalent torhs< lhs.
      6) Checks whetherlhs is greater than or equal torhs. Equivalent to!(lhs< rhs).

      Contents

      [edit]Parameters

      lhs, rhs - the paths to compare

      [edit]Return value

      true if the corresponding comparison yields,false otherwise.

      [edit]Exceptions

      noexcept specification:  
      noexcept
        

      [edit]Notes

      Path equality and equivalence have different semantics.

      In the case of equality, as determined byoperator==, only lexical representations are compared. Therefore,path("a")== path("b") is nevertrue.

      In the case of equivalence, as determined byequivalent(), it is checked whether two pathsresolve to the same file system object. Thusequivalent("a","b") will returntrue if the paths resolve to the same file.

      [edit]See also

      compares the lexical representations of two paths lexicographically
      (public member function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/experimental/fs/path/operator_cmp&oldid=154871"

      [8]ページ先頭

      ©2009-2026 Movatter.jp