Commit 8443c250 by Paolo Carlini Committed by Paolo Carlini

stl_queue.h (priority_queue<>::push, [...]): Remove try/catch, just follow the…

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
parent de1e45c3
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> 2006-08-03 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_queue.h: Trivial formatting fixes. * include/bits/stl_queue.h: Trivial formatting fixes.
......
...@@ -424,16 +424,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -424,16 +424,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
void void
push(const value_type& __x) push(const value_type& __x)
{ {
try c.push_back(__x);
{ std::push_heap(c.begin(), c.end(), comp);
c.push_back(__x);
std::push_heap(c.begin(), c.end(), comp);
}
catch(...)
{
c.clear();
__throw_exception_again;
}
} }
/** /**
...@@ -451,16 +443,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -451,16 +443,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
pop() pop()
{ {
__glibcxx_requires_nonempty(); __glibcxx_requires_nonempty();
try std::pop_heap(c.begin(), c.end(), comp);
{ c.pop_back();
std::pop_heap(c.begin(), c.end(), comp);
c.pop_back();
}
catch(...)
{
c.clear();
__throw_exception_again;
}
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment