From cef1af71cbf274c343b4945baad16a8bb545891c Mon Sep 17 00:00:00 2001
From: paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 25 May 2005 11:33:43 +0000
Subject: [PATCH] 2005-05-25  Paolo Carlini  <pcarlini@suse.de>

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


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100142 138bc75d-0d04-0410-961f-82ee72b054a4
---
 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 37880848f71a..00bb7493f6d3 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index 35dd364d969b..001a68f10085 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.
 	}
 
-- 
GitLab