Cannot call find with haystack elements having a explicit copy constructors

Per Nordlöw per.nordlow at gmail.com
Thu Jul 15 11:21:24 UTC 2021


On Thursday, 15 July 2021 at 11:08:25 UTC, Per Nordlöw wrote:
> fails in the same way. What's wrong?

```d
@safe struct Service {
     this(ref typeof(this) rhs) {}
     this(const ref typeof(this) rhs) const {}
}
```

also fails. On the other hand, using a postblit as

```
@safe struct Service {
     this(this) {}
}
```

passes.


More information about the Digitalmars-d-learn mailing list