[PATCH] Removing unused, non-standard function in _Rb_tree

Jonathan Wakely jwakely@redhat.com
Tue May 14 12:20:00 GMT 2019


	* include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
	Remove unused, non-standard function.

As suggested in https://gcc.gnu.org/ml/libstdc++/2016-12/msg00100.html
I've removed this unused member.

Tested powerpc64le-linux, committed to trunk.


-------------- next part --------------
commit 4a182e12a8255450650b890cc378f57d37d194cf
Author: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Tue May 14 12:19:10 2019 +0000

    Removing unused, non-standard function in _Rb_tree
    
            * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
            Remove unused, non-standard function.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271168 138bc75d-0d04-0410-961f-82ee72b054a4

diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h
index 7545ade3f7b..00e4a0cccbf 100644
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -1231,6 +1231,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_M_erase_aux(__position);
       }
 #endif
+
       size_type
       erase(const key_type& __x);
 
@@ -1253,8 +1254,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       erase(const_iterator __first, const_iterator __last)
       { _M_erase_aux(__first, __last); }
 #endif
-      void
-      erase(const key_type* __first, const key_type* __last);
 
       void
       clear() _GLIBCXX_NOEXCEPT
@@ -2533,16 +2532,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       return __old_size - size();
     }
 
-  template<typename _Key, typename _Val, typename _KeyOfValue,
-	   typename _Compare, typename _Alloc>
-    void
-    _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
-    erase(const _Key* __first, const _Key* __last)
-    {
-      while (__first != __last)
-	erase(*__first++);
-    }
-
   template<typename _Key, typename _Val, typename _KeyOfValue,
 	   typename _Compare, typename _Alloc>
     typename _Rb_tree<_Key, _Val, _KeyOfValue,


More information about the Libstdc++ mailing list