example:
```d
struct Test
{
this()(this)
{
static assert (0, "just like @disable");
}
}
void main()
{
Test test1;
Test test2;
test1 = test2;
}
```
that compiles and run perfectly.
user1234 via Digitalmars-d-learn Mon, 13 Apr 2026 02:26:44 -0700
example:
```d
struct Test
{
this()(this)
{
static assert (0, "just like @disable");
}
}
void main()
{
Test test1;
Test test2;
test1 = test2;
}
```
that compiles and run perfectly.