Commit ba46e66a by Paolo Carlini Committed by Paolo Carlini

locale_facets.tcc (money_put::do_put(..., long double)): Use the basic_string…

locale_facets.tcc (money_put::do_put(..., long double)): Use the basic_string constructor for char arrays...

2004-01-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc
	(money_put::do_put(..., long double)): Use the basic_string
	constructor for char arrays, not that for C-strings, to pass
	__digits to do_put(..., const string_type&): __ws isn't
	null-terminated.

From-SVN: r76355
parent 7bb9b33b
2004-01-22 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc
(money_put::do_put(..., long double)): Use the basic_string
constructor for char arrays, not that for C-strings, to pass
__digits to do_put(..., const string_type&): __ws isn't
null-terminated.
2004-01-22 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (_M_replace_safe): Change
signatures to take size_types and const _CharT*.
(_M_replace_aux): Likewise, takes size_types instead of
......
......@@ -1385,7 +1385,7 @@ namespace std
_CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __cs_size));
__ctype.widen(__cs, __cs + __len, __ws);
string_type __digits(__ws);
const string_type __digits(__ws, __len);
return this->do_put(__s, __intl, __io, __fill, __digits);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment