head	1.2;
access;
symbols
	gcc-2_8_1-990325:1.2
	gcc-2_8_1-990319:1.2
	gcc-2_8_1-990302:1.2
	gcc_2_8_1-990302:1.2
	gcc_2_8_1-990222:1.2
	gcc-2_8_1-990109:1.2
	gcc-2_8_1-981210:1.2
	gcc-2_8_1-981208:1.2
	gcc-2_8_1-980929:1.2
	gcc_2_8_1-980929:1.2
	gcc-2_8_1-980928:1.2
	gcc-2_8_1-980813:1.2
	gcc-2_8_1-980811:1.2
	gcc-2_8_1-980718:1.2
	gcc-2_8_1-980705:1.2
	gcc-2_8_1-980627:1.2
	gcc-2_8_1-980609:1.2
	gcc-2_8_1-980608:1.2
	gcc-2_8_1-980529:1.2
	gcc-2_8_1-980525:1.2
	gcc-2_8_1-980513:1.2
	gcc-2_8_1-980502:1.2
	gcc-2_8_1-980426:1.2
	gcc-2_8_1-980419:1.2
	gcc-2_8_1-980413:1.2
	gcc-2_8_1-980412:1.2
	gcc-2_8_1-980407:1.2
	gcc-2_8_1-980401:1.2
	gcc_2_8_1-980315:1.2
	gcc-2_8_1-RELEASE:1.2;
locks; strict;
comment	@# @;


1.2
date	97.04.23.22.45.03;	author mrs;	state Exp;
branches;
next	1.1;

1.1
date	96.09.30.21.32.20;	author mrs;	state Exp;
branches;
next	;


desc
@Bring over from libstdc++
@


1.2
log
@91th Cygnus<->FSF merge
@
text
@// RTTI support for -*- C++ -*-
// Copyright (C) 1994, 1995, 1996 Free Software Foundation

#ifndef __TYPEINFO__
#define __TYPEINFO__

#include <exception>

extern "C++" {

#if 0
namespace std {
#endif

class type_info {
private:
  // assigning type_info is not supported.  made private.
  type_info& operator= (const type_info&);
  type_info (const type_info&);

protected:
  type_info (const char *n): _name (n) { }

  const char *_name;

public:
  // destructor
  virtual ~type_info ();
    
  bool before (const type_info& arg) const;
  const char* name () const
    { return _name; }
  bool operator== (const type_info& arg) const;
  bool operator!= (const type_info& arg) const;
};

// We can't rely on common symbols being shared between translation units
// under Windows.  Sigh.

#ifndef _WIN32
inline bool type_info::
operator== (const type_info& arg) const
{
  return &arg == this;
}

inline bool type_info::
operator!= (const type_info& arg) const
{
  return &arg != this;
}
#endif

class bad_cast : public exception {
public:
  bad_cast() { }
  virtual ~bad_cast() { }
};

class bad_typeid : public exception {
 public:
  bad_typeid () { }
  virtual ~bad_typeid () { }
};

#if 0
} // namespace std
#endif

} // extern "C++"
#endif
@


1.1
log
@89th Cygnus<->FSF quick merge
@
text
@d30 1
a30 1
  bool before (const type_info& arg);
@
