次の方法で共有


type_index Class

type_index のクラスは type_info クラス にこのようなオブジェクトによってインデックス作成に関するヘルプへのポインターをラップします。

class type_index {
public:
    type_index(const type_info& tinfo);
    const char *name() const;
    size_t hash_code() const;
    bool operator==(const type_info& right) const;
    bool operator!=(const type_info& right) const;
    bool operator<(const type_info& right) const;
    bool operator<=(const type_info& right) const;
    bool operator>(const type_info& right) const;
    bool operator>=(const type_info& right) const;
};

コンストラクターは &tinfoに ptr を初期化します。

name が ptr->name() を返します。

hash_code は ptr->hash_code(). を返します。

operator== が *ptr == right.ptr を返します。

operator!= が !(*this == right) を返します。

operator< が *ptr->before(*right.ptr) を返します。

operator<= は !(right < *this). を返します。

operator>の戻り right < *this。

operator>= が !(*this < right) を返します。

参照

関連項目

実行時の型情報

<typeindex>