[Issue 17448] Move semantics cause memory corruption and cryptic bugs

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 30 17:08:43 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=17448

--- Comment #50 from Tomer Filiba (weka) <tomer at weka.io> ---
Btw, I tried adding to S

```
@disable void opPostMove(const ref S oldLocation) nothrow {}
```

But it doesn't have any effect (problem compiles and produces the same issue).

In C++, you can make types un-movable, which means that if there's need to move
them, you'll get a compile time error. 

I would love to be able to replicate this behavior.

--


More information about the Digitalmars-d-bugs mailing list