Error: none of the overloads of template `once.main.each!((l)

Joel joelcnz at gmail.com
Wed Oct 4 08:11:12 UTC 2023


What am I missing?

```d
import std;

void main() {
     struct DateRem {
         Date date;
         string rem;
         string toString() const => text(date.toSimpleString, " ", 
rem);
     }
     DateRem[] daterem;
     data
         .splitter('\n')
         .filter!(l => l.length && l[0].isDigit)
         .each!((l) {
             auto parts=l
                    	.splitter[0..3]
                 	.to!(int[]);
             if (parts.length==3) {
                 daterem~=DateRem(Date(parts[2],parts[1],parts[0]),
                             l.splitter[3..$].join(" "));
	        }
         });
	daterem.each!writeln;
}

auto data="04 10 2023 17:28, not much
30 9 2023 21:08, very little";
```


More information about the Digitalmars-d-learn mailing list