July 13th, 2009, 04:16 AM
Yep, I think that's a pretty accurate description.:)
July 10th, 2009, 04:52 AM
True enough, but that was the reason for the second part of that post ;)
I guess the point that I was trying to make is that it is possible to do by separating out the members into a protected...
July 10th, 2009, 04:37 AM
I agree on the container, or the user defined class, but the smart pointer will most likely change the intended behaviour of the object since both the original and the copy will be pointing to the...
July 10th, 2009, 04:31 AM
The normal way to not have to worry about how to assign vs how to copy construct is to write a swap function:
template <typename T>
class Buffer
{
public:
Buffer(size_t size)
...