On Monday, 3 October 2022 at 18:02:51 UTC, Salih Dincer wrote:
On Sunday, 2 October 2022 at 19:48:52 UTC, mw wrote:
```
text.csvReader!Layout(["b","c","a"]); // Read only these column
```

The intention is very clear: only read the selected columns from the csv, and for any other fields of class Layout, just ignore (with the default D .init value).

Why don't you do this?  For example you can try the following?

    ```d
    import std.csv, std.math.algebraic : abs;

    string str = "a,b,c\nHello,65,63.63\n➊➋➂❹,123,3673.562";
         struct Layout
         {
             int value;
             double other;
             string name;
         }


You didn't get my question, please add:

```
int extra_field;  // un-comment to see the error
```

to the struct, then you will see the error.


Reply via email to