for some type
. I receive a pointer to such a type into a function, and also an instance of
My function looks like this:
void bar(std::vector<T>* foo, const T& t)
Is there a way I write the function body in one statement?
*foo = t;
does not work due to an appropriate assignment operator not existing. I was also thinking of using
foo->assign(&t, &t + 1);
but that seems naughty.
I'm using C++11.