Should it compile?

Jack Applegame japplegame at gmail.com
Sat Jun 6 08:55:20 UTC 2020


Should it compile?

```d
import std.algorithm.mutation;

void main() {
     const char a = void;
     const char b ='b';
     moveEmplace(b, a); // mutation.d: Error: cannot modify const 
expression target
     assert(a == 'b');
}
```
I think, it should.


More information about the Digitalmars-d-learn mailing list