Standard C++ Library Reference ISO/IEC (VERSION3)
bool operator==(const type_info& right) const;
bool operator!=(const type_info& right) const;
bool before(const type_info& right) const;
const char *name() const;
private:
type_info(const type_info& right);
type_info& operator=(const type_info& right);
};
The class describes type information generated within the program 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, encoded values,
and collating order for types are all unspecified and may differ between program executions.
An expression of the form typeid Ty is the only way to construct a (temporary) typeinfo
object. The class has only a private copy constructor. Since the assignment operator is also
private, you cannot copy or assign objects of class typeinfo either.
type_info::operator!=
bool operator!=(const type_info& right) const;
The function returns !(*this == right).
type_info::operator==
bool operator==(const type_info& right) const;
The function returns a nonzero value if *this and right represent the same type.
type_info::before
bool before(const type_info& right) const;
The function returns a nonzero value if *this precedes right in the collating order for types.
type_info::name
const char *name() const;
The function returns a C string which specifies the name of the type.
See also the Table of Contents and the Index.
Copyright © 1992-2001 by P.J. Plauger. All rights reserved.