Clock.currTime
Kent via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Nov 20 07:26:39 PST 2014
I am reading the book 《D Cookbook》
In Page 36,this code can't be complied:
auto filtered = filter!((a) => Clock.currTime() -
a.timeLastModified >> 14.days)(sorted);
"sorted"'s type is DirEntry[].
The errors :
Error 1 Error:
'currTime(cast(immutable(TimeZone))opCall()).opBinary(a.timeLastModified())'
is not of integral type, it is a Duration
I don't know what's the problem?
More information about the Digitalmars-d-learn
mailing list