iterator_tracker.h (operator++): Fix returning dangling reference.
authorJonathan Wakely <jwakely.gcc@gmail.com>
Thu, 8 Nov 2012 09:15:43 +0000 (09:15 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 8 Nov 2012 09:15:43 +0000 (09:15 +0000)
* include/profile/iterator_tracker.h (operator++): Fix returning
dangling reference.
(operator--): Likewise.

From-SVN: r193323

libstdc++-v3/ChangeLog
libstdc++-v3/include/profile/iterator_tracker.h

index eee5bc9a7b24aa35def6016d7c69f6956ad72e5a..aa2e0a18c5daf9fee61350322c544df70778ebf4 100644 (file)
@@ -1,3 +1,9 @@
+2012-11-08  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * include/profile/iterator_tracker.h (operator++): Fix returning
+       dangling reference.
+       (operator--): Likewise.
+
 2012-11-07  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/debug/array (_GLIBCXX_THROW_OR_ABORT): Move...
index 733429daad3d120c1ba3a306d3447af087bcb479..91f733cf7576b8ec4db86a74d2b28e964f4e1e8e 100644 (file)
@@ -93,7 +93,7 @@ namespace __profile
        return *this;
       }
 
-      __iterator_tracker&
+      __iterator_tracker
       operator++(int)
       {
        _M_ds->_M_profile_iterate();
@@ -110,7 +110,7 @@ namespace __profile
        return *this;
       }
 
-      __iterator_tracker&
+      __iterator_tracker
       operator--(int)
       {
        _M_ds->_M_profile_iterate(1);