3 ms·
If you don't mind me asking ... what religion are you that considers copyable types to be the devil?
by marshray 14y ago
If you don't mind me asking ... what religion are you that considers copyable types to be the devil?
- shrughes 14y agoPresbyterian. Well no, but see http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Copy_Constructors#Copy_Constructors http://google-styleguide.googlecode.com/svn/trunk/cppguide.x... for some rationale in that direction. Generally speaking you might note that in Java and C#, if you want to copy a data structure, you have to do so explicitly.
- marshray 14y agoYeah I agree that one should intentionally enable or disable copy and assignment for a type. It might even make sense to disable implicit copying and make an explicit method for it instead. The C++11 move constructor and move assignment operator seem to me to be a wonderful middle ground.