basic_string.h (_Rep::_M_set_length_and_sharable): Use, consistently, traits_type...
authorPaolo Carlini <pcarlini@suse.de>
Wed, 25 May 2005 11:33:43 +0000 (11:33 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 25 May 2005 11:33:43 +0000 (11:33 +0000)
2005-05-25  Paolo Carlini  <pcarlini@suse.de>

* include/bits/basic_string.h (_Rep::_M_set_length_and_sharable):
Use, consistently, traits_type::assign.

From-SVN: r100142

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

index 37880848f71afe86fd4976ea8232719c3214ca01..00bb7493f6d3b7a0d365fadb1ec472b31f66a14a 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-25  Paolo Carlini  <pcarlini@suse.de>
+
+       * include/bits/basic_string.h (_Rep::_M_set_length_and_sharable):
+       Use, consistently, traits_type::assign.
+
 2005-05-25  Paolo Carlini  <pcarlini@suse.de>
 
        * config/cpu/alpha/atomicity.h: Use the builtins for
index 35dd364d969b53ecd6daa56dc041f6147bcdf4f4..001a68f10085dc84224d50baa2804ce6581cdcb8 100644 (file)
@@ -198,7 +198,8 @@ namespace std
        { 
          this->_M_set_sharable();  // One reference.
          this->_M_length = __n;
-         this->_M_refdata()[__n] = _S_terminal; // grrr. (per 21.3.4)
+         traits_type::assign(this->_M_refdata()[__n], _S_terminal);
+         // grrr. (per 21.3.4)
          // You cannot leave those LWG people alone for a second.
        }