[Issue 15662] Cannot move struct with defined opAssign due to @disabled post-blit

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Feb 18 04:13:42 PST 2016


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

--- Comment #6 from Dicebot <public at dicebot.lv> ---
(In reply to Kenji Hara from comment #5)
> (In reply to Dicebot from comment #4)
> > Btw note that this compiles:
> > 
> [snip]
> > .. though it should be semantically identical to appending. Is this a bug or
> > feature?
> 
> Wow, yes, it's definitely a bug. I'll open a new issue.

Was afraid of that :)

> > I really need a reliable way to force compiler to do such appending
> > to implement concept pointed out by Steven.
> 
> Rather it would be a library function.

No objections here. Question is - how to implement it inside a library (without
modifying compiler) if this array.length loophole is closed? Only thing that
comes to my mind is to reinterpret cast it to array of `ubyte[T.sizeof]` and do
manual blit copy but that feels very error-prone.

--


More information about the Digitalmars-d-bugs mailing list