OSDN Git Service

2007-04-06 Paolo Carlini <pcarlini@suse.de>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / src / stdexcept.cc
index af22c9e..19ac577 100644 (file)
@@ -1,6 +1,6 @@
 // Methods for Exception Support for -*- C++ -*-
 
-// Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -15,7 +15,7 @@
 
 // You should have received a copy of the GNU General Public License along
 // with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 // USA.
 
 // As a special exception, you may use this file as part of a free software
 // ISO C++ 14882: 19.1  Exception classes
 //
 
-#include <bits/std_string.h>
-#include <bits/std_stdexcept.h>
-#if 1
-#include <bits/stl_range_errors.h>
-#endif
+#include <string>
+#include <stdexcept>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
 
-namespace std 
-{
   logic_error::logic_error(const string& __arg) 
   : exception(), _M_msg(__arg) { }
 
-  logic_error::~logic_error() throw() { };
+  logic_error::~logic_error() throw() { }
 
   const char*
   logic_error::what() const throw()
@@ -63,7 +60,7 @@ namespace std
   runtime_error::runtime_error(const string& __arg) 
   : exception(), _M_msg(__arg) { }
 
-  runtime_error::~runtime_error() throw() { };
+  runtime_error::~runtime_error() throw() { }
 
   const char*
   runtime_error::what() const throw()
@@ -78,28 +75,5 @@ namespace std
   underflow_error::underflow_error(const string& __arg)
   : runtime_error(__arg) { }
 
-#if 1
-  // XXX need to deal with this.
-  void
-  __out_of_range(const char *str)
-  { throw out_of_range(str); }
-
-  void 
-  __length_error(const char *str)
-  { throw length_error(str); }
-
-  // XXX: From stl_range_errors.h, eventually these approaches need to
-  // be merged.
-  void 
-  __stl_throw_range_error(const char* __msg) 
-  { throw range_error(__msg); }
-
-  void 
-  __stl_throw_length_error(const char* __msg)
-  { throw length_error(__msg); }
-#endif
-} // namespace std
-
-
-
+_GLIBCXX_END_NAMESPACE