diff options
author | Paolo Carlini <pcarlini@suse.de> | 2006-08-04 09:34:17 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2006-08-04 09:34:17 +0000 |
commit | 8443c250af760dbb4489b3ff9e75bc334feba4df (patch) | |
tree | eb08cf4482b0d9806563ca2dc7a25aa86976ab48 | |
parent | de1e45c30bc2284d622379ceb31eb9c7b8cefe75 (diff) | |
download | gcc-8443c250af760dbb4489b3ff9e75bc334feba4df.zip gcc-8443c250af760dbb4489b3ff9e75bc334feba4df.tar.gz gcc-8443c250af760dbb4489b3ff9e75bc334feba4df.tar.bz2 |
stl_queue.h (priority_queue<>::push, [...]): Remove try/catch, just follow the letter of the Standard.
2006-08-04 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_queue.h (priority_queue<>::push,
priority_queue<>::pop): Remove try/catch, just follow the
letter of the Standard.
From-SVN: r115923
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_queue.h | 24 |
2 files changed, 10 insertions, 20 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5424e57..4958cf7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2006-08-04 Paolo Carlini <pcarlini@suse.de> + + * include/bits/stl_queue.h (priority_queue<>::push, + priority_queue<>::pop): Remove try/catch, just follow the + letter of the Standard. + 2006-08-03 Paolo Carlini <pcarlini@suse.de> * include/bits/stl_queue.h: Trivial formatting fixes. diff --git a/libstdc++-v3/include/bits/stl_queue.h b/libstdc++-v3/include/bits/stl_queue.h index e2cd0d5..84c0035 100644 --- a/libstdc++-v3/include/bits/stl_queue.h +++ b/libstdc++-v3/include/bits/stl_queue.h @@ -424,16 +424,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) void push(const value_type& __x) { - try - { - c.push_back(__x); - std::push_heap(c.begin(), c.end(), comp); - } - catch(...) - { - c.clear(); - __throw_exception_again; - } + c.push_back(__x); + std::push_heap(c.begin(), c.end(), comp); } /** @@ -451,16 +443,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) pop() { __glibcxx_requires_nonempty(); - try - { - std::pop_heap(c.begin(), c.end(), comp); - c.pop_back(); - } - catch(...) - { - c.clear(); - __throw_exception_again; - } + std::pop_heap(c.begin(), c.end(), comp); + c.pop_back(); } }; |