|
|
Hi,
per the discussion on the libstdc++ list. Tested x86-linux, committed to
mainline.
Paolo.
//////////////////
2006-08-04 Paolo Carlini <pcarlini@xxxxxxx>
* include/bits/stl_queue.h (priority_queue<>::push,
priority_queue<>::pop): Remove try/catch, just follow the
letter of the Standard.
Index: include/bits/stl_queue.h
===================================================================
--- include/bits/stl_queue.h (revision 115911)
+++ include/bits/stl_queue.h (working copy)
@@ -424,16 +424,8 @@
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 @@
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();
}
};
|
|