<div dir="ltr">Normally, you would need to disable both identity opAssign and postblit and it should work. At the moment, it works for the struct itself, however it breaks when the struct is nested in another one.<br>There are a couple of issues I am currently looking into fixing (after an IRC discussion with Eyal).<br><br>The gist of it isĀ <a href="https://github.com/dlang/dmd/pull/5854">https://github.com/dlang/dmd/pull/5854</a> . However with the current state of the specs / implementation that would make the language more inconsistent, which is why I put it on hold.<br>First we need to make `opAssign` properly transitive. You expect that the compiler-generated `opAssign` call its members `opAssign` if they have any. This currently happens, but only if the struct has neither dtor nor postblit.<br><br>There are probably a couple of other low-hanging fruits to harvest in the process (one of them is that the compiler-generated `opAssign` takes its argument by value, which result in the `struct` being copied and postblited...)</div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-19 11:37 GMT+02:00 Adrian Matoga via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sunday, 19 June 2016 at 02:06:59 UTC, deadalnix wrote:<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Long story short, I need structs that do not move. I'm sure there are many other use cases.<br>
</blockquote>
<br></span>
I needed that for a struct member function to be passed as delegate for a fiber.<br>
The easiest way I found was to malloc the struct.<br>
<br>
</blockquote></div><br></div>