+2004-01-27 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.tcc
+ (basic_string(const basic_string&, size_type, size_type),
+ basic_string(const basic_string&, size_type, size_type,
+ const _Alloc&)): Avoid unnecessarily constructing iterators.
+
2004-01-26 Paolo Carlini <pcarlini@suse.de>
* config/locale/generic/c_locale.cc: Fix throw messages
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const basic_string& __str, size_type __pos, size_type __n)
- : _M_dataplus(_S_construct(__str._M_ibegin()
+ : _M_dataplus(_S_construct(__str._M_data()
+ __str._M_check(__pos,
"basic_string::basic_string"),
- __str._M_ibegin() + __pos
+ __str._M_data() + __pos
+ __str._M_limit(__pos, __n),
_Alloc()), _Alloc())
{ }
basic_string<_CharT, _Traits, _Alloc>::
basic_string(const basic_string& __str, size_type __pos,
size_type __n, const _Alloc& __a)
- : _M_dataplus(_S_construct(__str._M_ibegin()
+ : _M_dataplus(_S_construct(__str._M_data()
+ __str._M_check(__pos,
"basic_string::basic_string"),
- __str._M_ibegin() + __pos
+ __str._M_data() + __pos
+ __str._M_limit(__pos, __n), __a), __a)
{ }