Second draft: Sum Type by Struct

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Sep 15 15:57:35 UTC 2026


On 07/09/2026 5:19 AM, MaxB wrote:
> "A sumtype may be declared as a template."
> 
> __sumtype S(Types...) = Types | bool;
> 
> -----
> 
> I only see a template parameter list. Can I still do the following?
> 
> __sumtype S(A, B) = A foo | B bar;

That should work yes, although untested.



More information about the dip.development mailing list