Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::error_category::operator==,!=,<,<=>

      From cppreference.com
      <cpp‎ |error‎ |error category
       
       
      Utilities library
       
      Diagnostics library
       
      std::error_category
      Member functions
      error_category::operator==error_category::operator!=error_category::operator<error_category::operator<=>
      (until C++20)(until C++20)(C++20)
       
      bool operator==(const error_category& rhs)constnoexcept;
      (1)(since C++11)
      bool operator!=(const error_category& rhs)constnoexcept;
      (2)(since C++11)
      (until C++20)
      bool operator<(const error_category& rhs)constnoexcept;
      (3)(since C++11)
      (until C++20)
      std::strong_ordering operator<=>(const error_category& rhs)constnoexcept;
      (4)(since C++20)

      Compares to another error category.

      1) Checks whether*this andrhs refer to the same object.
      2) Checks whether*this andrhs do not refer to the same object.
      3) Orders*this andrhs by the order ofthis and&rhs. Equivalent tostd::less<const error_category*>()(this,&rhs).
      4) Orders*this andrhs by the order ofthis and&rhs. Equivalent tostd::compare_three_way()(this,&rhs).

      The<,<=,>,>=, and!= operators aresynthesized fromoperator<=> andoperator== respectively.

      (since C++20)

      [edit]Parameters

      rhs - specifies theerror_category to compare

      [edit]Return value

      1)true if*this andrhs refer to the same object,false otherwise.
      2)true if*this andrhs do not refer to the same object,false otherwise.
      3)true if*this is less thanrhs as defined by the order ofthis and&rhs.
      4)std::strong_order::less if*this is less thanrhs as defined by the order ofthis and&rhs, otherwisestd::strong_order::greater ifrhs is less than*this in the order, otherwisestd::strong_order::equal.
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/error/error_category/operator_cmp&oldid=160527"

      [8]ページ先頭

      ©2009-2026 Movatter.jp