]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
basic_string.tcc (assign(const _CharT*, size_type)): When working in place remember...
authorPaolo Carlini <pcarlini@suse.de>
Sun, 8 Feb 2004 17:11:07 +0000 (17:11 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 8 Feb 2004 17:11:07 +0000 (17:11 +0000)
2004-02-08  Paolo Carlini  <pcarlini@suse.de>

* include/bits/basic_string.tcc (assign(const _CharT*, size_type)):
When working in place remember to set the state to sharable
(otherwise, _M_mutate does it).

From-SVN: r77487

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

index 97126b3bae5f1bf4f8e10a67693b0967464db6cd..a8a0edcf3cd3570c539284eead33cf100694f6ba 100644 (file)
@@ -1,3 +1,9 @@
+2004-02-08  Paolo Carlini  <pcarlini@suse.de>
+
+       * include/bits/basic_string.tcc (assign(const _CharT*, size_type)):
+       When working in place remember to set the state to sharable
+       (otherwise, _M_mutate does it).
+
 2004-02-08  Bernardo Innocenti  <bernie@develer.com>
 
        * include/bits/allocator.h, include/bits/basic_ios.h,
index 729b86cca0ed0d409aadd52f26e4dccfbe985ccb..4a79333ca87f45ba0ad2e54745ec64c2525050cc 100644 (file)
@@ -273,6 +273,7 @@ namespace std
             traits_type::copy(_M_data(), __s, __n);
           else if (__pos)
             traits_type::move(_M_data(), __s, __n);
+          _M_rep()->_M_set_sharable();
           _M_rep()->_M_length = __n;
           _M_data()[__n] = _Rep::_S_terminal;  // grr.
           return *this;