sumtype icon indicating copy to clipboard operation
sumtype copied to clipboard

A sum type for the D programming language

Results 4 sumtype issues
Sort by recently updated
recently updated
newest added

Example: ```d int someFun(T)(T v) { static assert(!is(T == int)); return 3; } SumType!(int, string, This[]) v; v.match!(all => someFun(all)); ``` use-case is that I have a generic (de)serialization function...

See this thread on the D forum: https://forum.dlang.org/post/[email protected] Profiling the test suite with LDC's `--ftime-trace` flag should be the first step here. Additional test cases, especially those derived from real-world...

Using sumtype 1.1.1: ``` import std.typecons : Tuple; import sumtype; alias A = SumType!(Tuple!(This[])); void main() {} ``` fails with: ``` .dub/packages/sumtype-1.1.1/sumtype/src/sumtype.d(281,16): Error: template instance `AliasSeq!(ReplaceTypeUnless!(isSumTypeInstance, This, SumType!(Tuple!(This[])), Tuple!(This[])))` recursive...

From the discussion on #57: > Can you please show example how to serialize sumtype object and deserialize it to original state (for example to and from abstract text representation)?...