Re: Safely wrapping an uncopyable struct to implement an interface

2020-03-04 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/4/20 9:04 AM, aliak wrote: On Wednesday, 4 March 2020 at 12:03:48 UTC, Gregor Mückl wrote: Hi! I've just created a situation in my code that is summarized by the following example. I don't know how to solve it with @safe code. A third party library provides a struct that is not

Re: Safely wrapping an uncopyable struct to implement an interface

2020-03-04 Thread aliak via Digitalmars-d-learn
On Wednesday, 4 March 2020 at 12:03:48 UTC, Gregor Mückl wrote: Hi! I've just created a situation in my code that is summarized by the following example. I don't know how to solve it with @safe code. A third party library provides a struct that is not copyable: // provided by third party

Safely wrapping an uncopyable struct to implement an interface

2020-03-04 Thread Gregor Mückl via Digitalmars-d-learn
Hi! I've just created a situation in my code that is summarized by the following example. I don't know how to solve it with @safe code. A third party library provides a struct that is not copyable: // provided by third party struct Foo { @disable this() @safe; @disable this(ref