Name

bad_typeid class — Exception for null pointer in typeid expressions

Synopsis

class bad_typeid : public exception {
public:
  bad_typeid(  ) throw(  );
  bad_typeid(const bad_typeid&) throw(  );
  bad_typeid& operator=(const bad_typeid&) throw(  );
  virtual ~bad_typeid(  ) throw(  );
  virtual const char* what(  ) const throw(  );
};

The typeid operator throws bad_typeid when it is applied to an expression of the form *p, in which p is a null pointer. See typeid in Chapter 3 for more information.

See Also

typeid operator

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.