[libstdc++] remove basic_string.tcc's _S_string_copy

Phil Edwards phil@jaj.com
Tue Jan 14 17:14:00 GMT 2003


This wasn't used in 3.2 or since.  Dunno about before then.  It doesn't
show up anywhere in the tree except for its own implementation and a couple
of brief mentions in changelogs.

No regressions, no changes in 'make check-abi'.

I won't actually commit this until later tonight or tomorrow.


2003-01-14  Phil Edwards  <pme@gcc.gnu.org>

	* include/bits/basic_string.tcc (_S_string_copy): Unused, remove.


Index: include/bits/basic_string.tcc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/basic_string.tcc,v
retrieving revision 1.29
diff -u -3 -p -r1.29 basic_string.tcc
--- include/bits/basic_string.tcc	2 Dec 2002 18:53:41 -0000	1.29
+++ include/bits/basic_string.tcc	14 Jan 2003 17:11:38 -0000
@@ -930,18 +930,6 @@ namespace std
       return __r;
     }
 
-  template <class _CharT, class _Traits, class _Alloc>
-    void
-    _S_string_copy(const basic_string<_CharT, _Traits, _Alloc>& __str,
-		   _CharT* __buf, typename _Alloc::size_type __bufsiz)
-    {
-      typedef typename _Alloc::size_type size_type;
-      size_type __strsize = __str.size();
-      size_type __bytes = std::min(__strsize, __bufsiz - 1);
-      _Traits::copy(__buf, __str.data(), __bytes);
-      __buf[__bytes] = _CharT();
-    }
-
   // Inhibit implicit instantiations for required instantiations,
   // which are defined via explicit instantiations elsewhere.  
   // NB: This syntax is a GNU extension.



More information about the Libstdc++ mailing list