
7 Oct
2007
7 Oct
'07
2:05 p.m.
Ulrich Eckhardt wrote:
Here is a simple deep-copying smart pointer.
Where from? I hope that one is not in productive use, because...
I just wrote it as an example.
...it looks like you are using placement new
I wrote this quite late, and mixed things up because initially I felt like writing things based on an allocator, but decided not to make things too complex. Obviously it should have been regular new, and not placement new.
Why? I mean since when is the CV qualification of a pointer relevant for the CV qualification of the pointee?
I thought it was relevant for private implementations. If the object is const, the implementation details should be const too.