std.sumtyp and option ?

kiriakov itcraft.letter at gmail.com
Thu Jun 29 14:18:05 UTC 2023


How to create option type over std.sumtype ?


```
enum None;
struct Some(T) { T x; }
alias Option = SumType!(Some!T, None);
```
I get
Error: undefined identifier `T`


More information about the Digitalmars-d-learn mailing list