United States    
COMPAQ STORE | PRODUCTS | SERVICES | SUPPORT
| CONTACT US | SEARCH
C++
type_info (3C++std) - Tru64 UNIX
Standard C++ Library

NAME

  type_info - type_info is a class which describes type information generated
  by the implementation.  Objects of class type_info store a pointer to a
  name for the type and an encoded value used to compare two types for
  equality or collating order. The names, encoding rule, and collating
  sequence for types are unspecified and may differ between programs.

  You can not copy or assign objects of class type_info.  This is because the
  copy constructor and assignment operator are private.  You construct a
  type_info object by: typeid o;

SYNOPSIS

  #include <exception>

  namespace std {
    class type_info {
      public:
        virtual ~type_info();
        bool operator==(const type_info& rhs) const;
        bool operator!=(const type_info& rhs) const;
        bool before(const type_info& rhs) const;
        const char *name() const;
      private:
        type_info(const type_info& rhs);
        type_info& operator=(const type_info& rhs);
    };
  }

DESCRIPTION

  bool operator==(const type_info& rhs) const;

  This function compares the current object with rhs.  It returns true if the
  two values describe the same type.

  bool operator!=(const type_info& rhs) const;

  This function compares the current object with rhs.  It returns true if the
  two values do not describe the same type.

  bool before(const type_info& rhs) const;

  This function compares the current object with rhs.  It returns true if
  *this precedes rhs in the implementation's collation order.  cp const char
  *name() const;

  This function returns a null terminated string which contains the name of
  the type.  The return value is implementation defined.

  type_info(const type_info& rhs);
  type_info& operator=(const type_info& rhs);

  These functions copy a type_info object.  Because they are private objects
  of type type_info can not be copied.

SEE ALSO

  typeid

STANDARDS CONFORMANCE

  ANSI X3J16/ISO WG21 Joint C++ Committee
  

1.800.AT.COMPAQ

privacy and legal statement