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 {}
}
@safe struct Session {
void openAndGet
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 Servi
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 {
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 {}
}
@safe struct Session {
void openAndGetService(in string key) scope {
import std.algorithm.sea