summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-10 09:23:59 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-10 09:23:59 +0000
commitf6751e6d782473063839e7e5bcb48f453e49c914 (patch)
treee015385ca2c6cda8546ebacb902d942437391367
parent7463cbdfa9bf4c9dfaac8d33efa9858f4292f7d5 (diff)
downloadppe42-gcc-f6751e6d782473063839e7e5bcb48f453e49c914.tar.gz
ppe42-gcc-f6751e6d782473063839e7e5bcb48f453e49c914.zip
2006-09-10 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_heap.h (sort_heap): Iterator post-decrement is only required to be convertible to the iterator type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116812 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/bits/stl_heap.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index c2145be7ae3..7c381e7db20 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-10 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_heap.h (sort_heap): Iterator post-decrement is
+ only required to be convertible to the iterator type.
+
2006-09-08 Paolo Carlini <pcarlini@suse.de>
* include/tr1/random.tcc (poisson_distribution<>::operator()):
diff --git a/libstdc++-v3/include/bits/stl_heap.h b/libstdc++-v3/include/bits/stl_heap.h
index f9e337f31be..2f0d04c5e4d 100644
--- a/libstdc++-v3/include/bits/stl_heap.h
+++ b/libstdc++-v3/include/bits/stl_heap.h
@@ -1,6 +1,6 @@
// Heap implementation -*- C++ -*-
-// Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004, 2005, 2006 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
@@ -430,7 +430,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// __glibcxx_requires_heap(__first, __last);
while (__last - __first > 1)
- std::pop_heap(__first, __last--);
+ std::pop_heap(__first, _RandomAccessIterator(__last--));
}
/**
@@ -455,7 +455,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_requires_heap_pred(__first, __last, __comp);
while (__last - __first > 1)
- std::pop_heap(__first, __last--, __comp);
+ std::pop_heap(__first, _RandomAccessIterator(__last--), __comp);
}
_GLIBCXX_END_NAMESPACE
OpenPOWER on IntegriCloud