On Sunday, 19 June 2016 at 02:06:59 UTC, deadalnix wrote:
Long story short, I need structs that do not move. I'm sure
there are many other use cases.
This would be useful for std.typecons.scoped - class instances
can be moved otherwise (which is illegal).
I think if structs can disable mov
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.
There are a couple of issues I am currently looking into fixing (after an
IRC discussion with Eyal).
On Sunday, 19 June 2016 at 02:06:59 UTC, deadalnix wrote:
Long story short, I need structs that do not move. I'm sure
there are many other use cases.
I needed that for a struct member function to be passed as
delegate for a fiber.
The easiest way I found was to malloc the struct.
On Sunday, 19 June 2016 at 02:06:59 UTC, deadalnix wrote:
Long story short, I need structs that do not move. I'm sure
there are many other use cases.
there definitely are. Eyal from Weka, for example, desperately
wants 'em to implement intrusive lists, and even created a bug
report[1] for the
Well all is in the title. Is there a way to achieve this ? If
not, would this be possible to make this happen ?
Background: I'm working on synchronization primitives for SDC's
runtime. All the cool kids synchronization primitives rely on the
mutex's address to do various things.
Making the m