string (basic_string::insert): Add iterator check and pass normal iterator to normal...
authorFrançois Dumont <francois.cppdevs@free.fr>
Sat, 19 Feb 2011 20:51:43 +0000 (21:51 +0100)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Sat, 19 Feb 2011 20:51:43 +0000 (20:51 +0000)
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.

From-SVN: r170322

libstdc++-v3/ChangeLog
libstdc++-v3/include/debug/macros.h
libstdc++-v3/include/debug/string

index 525cf7d558efa9318d370e6df09f2e6c0c5a6e8f..1d5cbcdd104379ac857e018228cadd89b51faaa2 100644 (file)
@@ -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
index 1244612118c1d2fc7c3521d0f76393988f7167d5..c90bec5cf01158cf1e82fa77b3ff57c9db5759a1 100644 (file)
@@ -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)                    \
index 4fe0a0686d707f7986ec72c9a85803dc79083709..fe073f21c7fd22067bebec49cc0384ce73faf08f 100644 (file)
@@ -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__