Spec-Zone.ru › C++

Стандартная библиотека заголовок <typeindex> (C++11)

Этот заголовок является частью библиотеки поддержки типов поддержки типов.

Включения

<compare>
(C++20)
Поддержка оператора сравнения с тремя способами сравнения оператор сравнения с тремя способами сравнения

Классы

type_index
(C++11)
Обёртка вокруг объекта type_info, которая может использоваться в качестве индекса в ассоциативных и неупорядоченных ассоциативных контейнерах
(класс)
std::hash<std::type_index>
(C++11)
Поддержка хеширования для std::type_index
(специализация шаблона класса)
Объявления в стиле Forward
Определено в заголовке <functional>
hash
(C++11)
Объект хеш-функции
(шаблон класса)

Сводка

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

Класс std::type_index

namespace std {
  class type_index {
  public:
    type_index(const type_info& rhs) noexcept;
    bool operator==(const type_index& rhs) const noexcept;
    bool operator< (const type_index& rhs) const noexcept;
    bool operator> (const type_index& rhs) const noexcept;
    bool operator<=(const type_index& rhs) const noexcept;
    bool operator>=(const type_index& rhs) const noexcept;
    strong_ordering operator<=>(const type_index& rhs) const noexcept;
    size_t hash_code() const noexcept;
    const char* name() const noexcept;
 
  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.
  };
}

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/header/typeindex

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API