how to assign to shared obj.systime?

mw mingwu at gmail.com
Fri Jul 10 02:59:56 UTC 2020


```
import std.datetime;

class A {
         SysTime time;
}

void main() {
         shared A a = new A();
         SysTime time;
         a.time = time;
}
```

Error: template std.datetime.systime.SysTime.opAssign cannot 
deduce function from argument types !()(SysTime) shared, 
candidates are:
/usr/include/dmd/phobos/std/datetime/systime.d(659,17):        
opAssign()(auto ref const(SysTime) rhs)




More information about the Digitalmars-d-learn mailing list