basic_string.h (_Rep::_M_set_length_and_sharable): Use, consistently, traits_type::assign.

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
This commit is contained in:
Paolo Carlini 2005-05-25 11:33:43 +00:00 committed by Paolo Carlini
parent 910dc5cc95
commit be62afb4d5
2 changed files with 7 additions and 1 deletions

View 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

View 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.
}