Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      Standard library header <typeindex> (C++11)

      From cppreference.com
      <cpp‎ |header
       
       
      Standard library headers
       

      This header is part of thetype support library.

      Contents

      Includes

      (C++20)
      Three-way comparison operator support[edit]

      Classes

      (C++11)
      wrapper around atype_info object, that can be used as index in associative and unordered associative containers
      (class)[edit]
      hash support forstd::type_index
      (class template specialization)[edit]
      Forward declarations
      Defined in header<functional>
      (C++11)
      hash function object
      (class template)[edit]

      [edit]Synopsis

      #include <compare> namespace std{class type_index;template<class T>struct hash;template<>struct hash<type_index>;}

      [edit]Classstd::type_index

      namespace std{class type_index{public:    type_index(const type_info& rhs)noexcept;bool operator==(const type_index& rhs)constnoexcept;bool operator<(const type_index& rhs)constnoexcept;bool operator>(const type_index& rhs)constnoexcept;bool operator<=(const type_index& rhs)constnoexcept;bool operator>=(const type_index& rhs)constnoexcept;    strong_ordering operator<=>(const type_index& rhs)constnoexcept;    size_t hash_code()constnoexcept;constchar* name()constnoexcept; private:const type_info* target;// exposition only// Note that the use of a pointer here, rather than a reference,// means that the default copy/move constructor and assignment// operators will be provided and work as expected.};}
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/header/typeindex&oldid=178397"

      [8]ページ先頭

      ©2009-2025 Movatter.jp