namespace std {
class type_info {
public:
virtual ~type_info();
bool operator==(const type_info& rhs) const noexcept;
bool operator!=(const type_info& rhs) const noexcept;
bool before(const type_info& rhs) const noexcept;
size_t hash_code() const noexcept;
const char* name() const noexcept;
type_info(const type_info& rhs) = delete; type_info& operator=(const type_info& rhs) = delete; };
}
The class
type_info
describes type information generated by the implementation
. Objects of this class effectively store a pointer to a name for the type, and
an encoded value suitable for comparing two types for equality or collating order
. The names, encoding rule, and collating sequence for types are all unspecified
and may differ between programs
. bool operator==(const type_info& rhs) const noexcept;
Effects:
Compares the current object with
rhs. Returns:
true
if the two values describe the same type
. bool operator!=(const type_info& rhs) const noexcept;
Returns:
!(*this == rhs). bool before(const type_info& rhs) const noexcept;
Effects:
Compares the current object with
rhs. Returns:
true
if
*this
precedes
rhs in the implementation's collation order
. size_t hash_code() const noexcept;
Returns: An unspecified value, except that within a single execution of the
program, it shall return the same value for any two
type_info
objects which compare equal
. Remarks: An implementation should return different values for two
type_info objects which do not compare equal
. const char* name() const noexcept;
Returns:
An
implementation-defined
ntbs.