
"Christopher Kohlhoff" <chris@kohlhoff.com> wrote in message news:20050819143228.41797.qmail@web32604.mail.mud.yahoo.com...
Hi Rob,
--- Rob Stewart <stewart@sig.com> wrote:
OTOH, using swap(), *if* a user used a vector<double> instead of the array you mention, then vector won't add overhead.
But Thorsten was proposing only the use of vector<char>, so you would still need to convert from vector<double> to vector<char>.
I'm proposing a lot. In one mail I wrote vector<T>. I don't know what's required, if you can only send chars or not. So if you need to send arbitrary data, then just allow both T (&)[N] and vector<T>. (so no copy needed) Having these two variants don't prohibit you from providing an overload based on void* which is then used internally in the two other variants. -Thorsten