diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-07 20:26:24 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-07 20:26:24 +0000 |
commit | 15f85ffa17be2c112702013e0d5eebc0b5a3abec (patch) | |
tree | 710c4b07600eecce610471e49a8073942cbf0a1d /libstdc++-v3/libsupc++/new | |
parent | ea298e004c40ead8035640c50738bb597dbede96 (diff) | |
download | gcc-15f85ffa17be2c112702013e0d5eebc0b5a3abec.tar.gz |
2001-02-07 Benjamin Kosnik <bkoz@redhat.com>
Clean up stdexcept.
* include/bits/stringfwd.h: New file.
* include/bits/stl_string_fwd.h: Remove.
* include/bits/localefwd.h: Remove declaration for allocator.
* include/bits/std_iosfwd: Same.
* include/bits/std_string.h: Include it.
* include/bits/std_ios.h: Remove include.
* include/bits/basic_string.h: Tweak.
* libsupc++/new: Format.
* src/Makefile.am (base_headers): Add stringfwd.h, remove
stl_string_fwd.h
* src/Makefile.in: Regenerate.
* include/bits/std_stdexcept.h: Rewrite.
* src/stdexcept.cc: Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39526 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/libsupc++/new')
-rw-r--r-- | libstdc++-v3/libsupc++/new | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/libstdc++-v3/libsupc++/new b/libstdc++-v3/libsupc++/new index cb66dacc444..87c9d712f37 100644 --- a/libstdc++-v3/libsupc++/new +++ b/libstdc++-v3/libsupc++/new @@ -1,5 +1,6 @@ // The -*- C++ -*- dynamic memory management header. -// Copyright (C) 1994, 1996, 1997, 1998, 2000 Free Software Foundation + +// Copyright (C) 1994, 1996, 1997, 1998, 2000, 2001 Free Software Foundation // This file is part of GNU CC. // @@ -36,31 +37,31 @@ extern "C++" { -namespace std { - - class bad_alloc : public exception { +namespace std +{ + class bad_alloc : public exception + { public: virtual const char* what() const throw() { return "bad_alloc"; } }; - struct nothrow_t {}; + struct nothrow_t { }; extern const nothrow_t nothrow; typedef void (*new_handler)(); - new_handler set_new_handler (new_handler); - + new_handler set_new_handler(new_handler); } // namespace std -// replaceable signatures -void *operator new (std::size_t) throw (std::bad_alloc); -void *operator new[] (std::size_t) throw (std::bad_alloc); -void operator delete (void *) throw(); -void operator delete[] (void *) throw(); -void *operator new (std::size_t, const std::nothrow_t&) throw(); -void *operator new[] (std::size_t, const std::nothrow_t&) throw(); -void operator delete (void *, const std::nothrow_t&) throw(); -void operator delete[] (void *, const std::nothrow_t&) throw(); +// Replaceable signatures. +void *operator new(std::size_t) throw (std::bad_alloc); +void *operator new[](std::size_t) throw (std::bad_alloc); +void operator delete(void *) throw(); +void operator delete[](void *) throw(); +void *operator new(std::size_t, const std::nothrow_t&) throw(); +void *operator new[](std::size_t, const std::nothrow_t&) throw(); +void operator delete(void *, const std::nothrow_t&) throw(); +void operator delete[](void *, const std::nothrow_t&) throw(); -// default placement versions of operator new +// Default placement versions of operator new. inline void *operator new(std::size_t, void *place) throw() { return place; } inline void *operator new[](std::size_t, void *place) throw() { return place; } } // extern "C++" |