https://issues.dlang.org/show_bug.cgi?id=12628
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Hardware|x86 |All OS|Mac OS X |All --- Comment #1 from [email protected] --- (In reply to Andrei Alexandrescu from comment #0) > Consider: > > #!/Users/aalexandre/bin/rdcc > import std.conv, std.stdio; > > struct A > { > A* next; > bool b; > @disable this(this); > } > > struct B > { > A a; > } > > void main() > { > A a; > emplace(&a, A(null, false));we > B b; > emplace(&b, A()); > } > > Both calls fail to compile. These calls to emplace should work because they > don't need to postblit stuff around - they could just move from the rvalues > received. Hum... looks like you are asking for emplace to know how to elide postblit... It *should* be doable, but it's kind of hard: I'll try to look into making it work. It's necessary for making it function with "opCall()" anyways. In the meantime, you could just: emplace(&a, null, false); //emplace from args emplace(&b); //construct by default I'll look into making it work. First case should be "easy-ish". The second seems harder... --
