September 24, 2016 Assignment Semantics Trait | ||||
---|---|---|---|---|
| ||||
Is there a trait, say `assignmentSemantics`, that tells whether a container type `C` has - copy (C++ containers), - reference (D containers), or - move (Rust) semantics when an instance of `C` is assigned to a new variable. If not, could `__traits(hasMember, C, "dup")` play a role in such an implementation? This could, for instance, be used as an - extra CT-check in C++ to D conversion tools, such as CPP2D and - aid when implementing `deepDup()` |
Copyright © 1999-2021 by the D Language Foundation