On 2010-09-17 04:15:31 -0400, Andrei Alexandrescu
<[email protected]> said:
On a funny note, we figured that for a number of reasons it would help
to allow C++-style constructors that offer access to the source; it
just turns out some idioms need to modify the source as well as the
destination.
One obvious example is the built-in hashtable that is not shared
properly when it's null. Making the copy constructor spring the
hashtable to life would make it more uniform in behavior.
At the basic level I feel uneasy with this whole idea of modifying the
source while copying. It means that you can't copy the source if it is
const. Do you really want to make const containers uncopyable?
--
Michel Fortin
[email protected]
http://michelf.com/