std.sumtype nested SumTypes
Paul Backus
snarwin at gmail.com
Mon Jan 22 21:36:47 UTC 2024
On Monday, 22 January 2024 at 21:11:17 UTC, NonNull wrote:
>
> I'd like SumType to combine the implicit tags so there's only
> one tag.
SumType does not do this automatically (because sometimes you
might want to keep the inner SumTypes separate), but you can do
it yourself like this:
alias A = SumType!(X, Y);
alias B = SumType!(Z, W);
alias C = SumType!(A.Types, B.Types);
More information about the Digitalmars-d-learn
mailing list