From be62afb4d55d42c776c13a70800f3d0300f9bb6a Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 25 May 2005 11:33:43 +0000 Subject: [PATCH] basic_string.h (_Rep::_M_set_length_and_sharable): Use, consistently, traits_type::assign. 2005-05-25 Paolo Carlini * include/bits/basic_string.h (_Rep::_M_set_length_and_sharable): Use, consistently, traits_type::assign. From-SVN: r100142 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/bits/basic_string.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 37880848f71..00bb7493f6d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2005-05-25 Paolo Carlini + + * include/bits/basic_string.h (_Rep::_M_set_length_and_sharable): + Use, consistently, traits_type::assign. + 2005-05-25 Paolo Carlini * config/cpu/alpha/atomicity.h: Use the builtins for diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 35dd364d969..001a68f1008 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -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. } -- 2.30.2