Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hasComplex{Assignment,Copying,Destruction). (#9088)
These are the Phobos v3 equivalents of std.traits' hasElaborateAssign, hasElaborateCopyConstructor, and hasElaborateDestructor. After some discussion with Adam Wilson, I went with "Complex" rather than "Elaborate" with the idea that it would be easier to understand for non-native English speakers. It's also shorter, which is a plus. I also tried to make the names more consistent (and avoided having "CopyConstructor" in the name, because it also deals with the postblit constructor). For the moment, I have not created hasComplexMoving to check for move constructors, since that situation has yet to be finalized in the language. I was surprised to find out that hasElaborateMove was even a thing, since it was my understanding that opPostMove had never actually been implemented, so I don't know if we're going to have to worry about that at all, but either way, it seemed best to leave the question of a trait for moving until later given that that situation is still in limbo (even if it does look like the new compiler implementation is well along).
- Loading branch information