Jonathan M Davis wrote:
The weird thing here is that you're actually altering the parameter that you passed in, which is normally a major no-no with copy constructors.
Yup.One subtle but important distinction from C++ is that D can omit copy construction completely if the compiler can determine there are no further uses of the source object, and substitute a simple bit copy. This should result in a fundamental performance improvement.
