$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Daniel Krügler (dsp_at_[hidden])
Date: 2008-07-07 05:46:22
Sean Farrow wrote:
> How does this assign overload work?
> Sound like wht I need.
Like the c'tor call, but using assign instead ;-):
void from_vector(std::wstring& dst, const std::vector<wchar_t>& src) {
dst.assign(src.begin(), src.end());
}
This call is semantically equivalent to:
dst.assign(wstring(src.begin(), src.end()));
The c'tor template accepts any InputIterator with value type convertible
to the value_type of the corresponding basic_string.
[N.B.: If InputIterator is actually an integral type the standard
requires that instead of a sequence constructor the constructor is
invoked which creates astring of given size with given character value]
Greetings from Bremen,
Daniel Krügler