]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
basic_string.h (_M_replace_aux, [...]): Move out of line...
authorPaolo Carlini <pcarlini@suse.de>
Wed, 27 Oct 2004 12:02:37 +0000 (12:02 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 27 Oct 2004 12:02:37 +0000 (12:02 +0000)
2004-10-27  Paolo Carlini  <pcarlini@suse.de>

* include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
Move out of line...
* include/bits/basic_string.tcc: ... here.

From-SVN: r89637

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/include/bits/basic_string.tcc

index f51f6f1d005df9fae037d40660cfcd3a626641b3..71d793d6d56b7c7a7ebf3ccc8796cdd1bdf1cee5 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-27  Paolo Carlini  <pcarlini@suse.de>
+
+       * include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
+       Move out of line...
+       * include/bits/basic_string.tcc: ... here.
+
 2004-10-26  Paolo Carlini  <pcarlini@suse.de>
 
        * include/bits/basic_string.h (append(const basic_string&),
index 6550b9c33622582304fe1eff95e63c82472f53dd..be340ff9420a31566599a86ab0f3bcb19e47d54a 100644 (file)
@@ -1435,24 +1435,11 @@ namespace std
 
       basic_string&
       _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
-                    _CharT __c)
-      {
-       _M_check_length(__n1, __n2, "basic_string::_M_replace_aux");
-       _M_mutate(__pos1, __n1, __n2);
-       if (__n2)
-         _M_assign(_M_data() + __pos1, __n2, __c);
-       return *this;
-      }
+                    _CharT __c);
 
       basic_string&
       _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
-                     size_type __n2)
-      {
-       _M_mutate(__pos1, __n1, __n2);
-       if (__n2)
-         _M_copy(_M_data() + __pos1, __s, __n2);
-       return *this;
-      }
+                     size_type __n2);
 
       // _S_construct_aux is used to implement the 21.3.1 para 15 which
       // requires special behaviour if _InIter is an integral type
index 6bd129682029f556c906b7e16f08d3679f2b83f0..b5f86459b2480a6f61518048b4e86c8ccd73d0b0 100644 (file)
@@ -620,7 +620,32 @@ namespace std
        return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(),
                               __s.size());
       }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
+                  _CharT __c)
+    {
+      _M_check_length(__n1, __n2, "basic_string::_M_replace_aux");
+      _M_mutate(__pos1, __n1, __n2);
+      if (__n2)
+       _M_assign(_M_data() + __pos1, __n2, __c);
+      return *this;
+    }
+
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
+                   size_type __n2)
+    {
+      _M_mutate(__pos1, __n1, __n2);
+      if (__n2)
+       _M_copy(_M_data() + __pos1, __s, __n2);
+      return *this;
+    }
+   
   template<typename _CharT, typename _Traits, typename _Alloc>
     basic_string<_CharT, _Traits, _Alloc>
     operator+(const _CharT* __lhs,