digitalmars.D.learn - Assignment Semantics Trait
- =?UTF-8?B?Tm9yZGzDtnc=?= (12/12) Sep 24 2016 Is there a trait, say `assignmentSemantics`, that tells whether a
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()`
Sep 24 2016