tom_usenet <to********@hotmail.com> wrote in message news:<gk********************************@4ax.com>. ..
On 5 Feb 2004 21:28:39 -0800, sm*@essemer.com.au (Steven Reddie)
wrote:
std::vector<char> v(chararray, chararray + sizeof(chararray));
will collapse to a memcpy or memmove call on most (all?) vector
implementations I know of. Trace in with a debugger to confirm.
Thanks guys. It looks like I'm misreading the docs. This last form
of constructor must be the one defined as:
template<class InputIterator> vector(InputIterator _First,
InputIterator _Last);
which implies that InputIterator for a vector<char> is or is
implicitly constructed from a char*. It's been a while since I've
used the STL that it seems that I'm forgetting some really basic
stuff.
Regards,
Steven