diff options
author | fdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-19 20:51:43 +0000 |
---|---|---|
committer | fdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-19 20:51:43 +0000 |
commit | 0b2101748d1a7e2eb7f53dcb8636ade66f6a98d9 (patch) | |
tree | 27994d3c3c0fe11e932e1ec5d49bbdcd61cf0c4b /libstdc++-v3 | |
parent | d892298fb6d41c798541e7ca871eeb0556484a1b (diff) | |
download | gcc-0b2101748d1a7e2eb7f53dcb8636ade66f6a98d9.tar.gz |
2011-02-19 François Dumont <francois.cppdevs@free.fr>
* include/debug/string (basic_string::insert): Add iterator check and
pass normal iterator to normal insert.
* include/debug/macros.h (__glibcxx_check_heap,
__glibcxx_check_heap_pred): Remove __glibcxx_check_valid_range,
already done.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170322 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 8 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/macros.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/string | 3 |
3 files changed, 10 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 525cf7d558e..1d5cbcdd104 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2011-02-19 François Dumont <francois.cppdevs@free.fr> + + * include/debug/string (basic_string::insert): Add iterator check and + pass normal iterator to normal insert. + * include/debug/macros.h (__glibcxx_check_heap, + __glibcxx_check_heap_pred): Remove __glibcxx_check_valid_range, + already done. + 2011-02-17 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/47776 diff --git a/libstdc++-v3/include/debug/macros.h b/libstdc++-v3/include/debug/macros.h index 1244612118c..c90bec5cf01 100644 --- a/libstdc++-v3/include/debug/macros.h +++ b/libstdc++-v3/include/debug/macros.h @@ -286,7 +286,6 @@ _GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper(_First, _Last, \ // Verify that the iterator range [_First, _Last) is a heap #define __glibcxx_check_heap(_First,_Last) \ -__glibcxx_check_valid_range(_First,_Last); \ _GLIBCXX_DEBUG_VERIFY(std::__is_heap(_First, _Last), \ _M_message(__gnu_debug::__msg_not_heap) \ ._M_iterator(_First, #_First) \ @@ -295,7 +294,6 @@ _GLIBCXX_DEBUG_VERIFY(std::__is_heap(_First, _Last), \ /** Verify that the iterator range [_First, _Last) is a heap w.r.t. the predicate _Pred. */ #define __glibcxx_check_heap_pred(_First,_Last,_Pred) \ -__glibcxx_check_valid_range(_First,_Last); \ _GLIBCXX_DEBUG_VERIFY(std::__is_heap(_First, _Last, _Pred), \ _M_message(__gnu_debug::__msg_not_heap_pred) \ ._M_iterator(_First, #_First) \ diff --git a/libstdc++-v3/include/debug/string b/libstdc++-v3/include/debug/string index 4fe0a0686d7..fe073f21c7f 100644 --- a/libstdc++-v3/include/debug/string +++ b/libstdc++-v3/include/debug/string @@ -514,7 +514,8 @@ namespace __gnu_debug void insert(iterator __p, std::initializer_list<_CharT> __l) { - _Base::insert(__p, __l); + __glibcxx_check_insert(__p); + _Base::insert(__p.base(), __l); this->_M_invalidate_all(); } #endif // __GXX_EXPERIMENTAL_CXX0X__ |