Cannot call find with haystack elements having a explicit copy constructors
Per Nordlöw
per.nordlow at gmail.com
Thu Jul 15 11:29:24 UTC 2021
On Thursday, 15 July 2021 at 11:08:25 UTC, Per Nordlöw wrote:
> The adding of copy construtors to `Service` defined as
>
> ```d
> @safe struct Service {
> this(ref return scope typeof(this) rhs) {}
> this(const ref return scope typeof(this) rhs) const {}
> }
Using `inout` as
```d
@safe struct Service {
this(inout ref typeof(this) rhs) inout {}
}
```
works.
More information about the Digitalmars-d-learn
mailing list