Sascha Volkenandt wrote:
On Sunday 20 November 2005 20:53, Jon Burgess wrote:
[ explaination of why the strstr example works deleted ]
So, no unexpected behaviour here.
Yes, you're right. The intermeadiate buffer which is created avoids the problem. I confirmed this myself after sending the previous email.
Like I mentioned before, I don't think all of this is necessary since the normal ctor and the copy ctor cover all cases.
I think something should be done to fix the "assign cString to itself" case, even though this is very unlikely. This does go wrong with the current code, even with the copy constructor added.
Jon