Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

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

      From cppreference.com
      <cpp‎ |types‎ |type index
       
       
      Utilities library
       
       
      std::type_index
      Member functions
      type_index::operator=type_index::operator!=type_index::operator<type_index::operator<=type_index::operator>type_index::operator>=type_index::operator<=>
      (until C++20)(C++20)
      Helper classes
       
      bool operator==(const type_index& rhs)constnoexcept;
      (1)(since C++11)
      bool operator!=(const type_index& rhs)constnoexcept;
      (2)(since C++11)
      (until C++20)
      bool operator<(const type_index& rhs)constnoexcept;
      (3)(since C++11)
      bool operator<=(const type_index& rhs)constnoexcept;
      (4)(since C++11)
      bool operator>(const type_index& rhs)constnoexcept;
      (5)(since C++11)
      bool operator>=(const type_index& rhs)constnoexcept;
      (6)(since C++11)
      std::strong_ordering operator<=>(const type_index& rhs)constnoexcept;
      (7)(since C++20)

      Compares the underlyingstd::type_info objects.

      1,2) Checks whether the underlyingstd::type_info objects refer to the same type.
      3-7) Compares the underlyingstd::type_info objects as defined by an implementation-defined ordering. The comparison is done bytype_info::before.

      The!= operator issynthesized fromoperator==.

      (since C++20)

      [edit]Parameters

      rhs - anothertype_index object to compare to

      [edit]Return value

      1)true if the underlyingstd::type_info objects refer to the same type,false otherwise.
      2)true if the underlyingstd::type_info objects refer not to the same type,false otherwise.
      3-6)true if the types referred by the underlyingstd::type_info objects are ordered by corresponding order,false otherwise.
      7)std::strong_ordering::equal if the underlyingstd::type_info objects refer to the same type, otherwisestd::strong_ordering::less if*this's underlyingstd::type_info object precedesrhs's in the implementation-defined ordering, otherwisestd::strong_ordering::greater.
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/types/type_index/operator_cmp&oldid=160655"

      [8]ページ先頭

      ©2009-2025 Movatter.jp