Comment Comment by lumberjackstian Depends on the value of the template parameter. If it's 0 the return type is an int, if it's not 0 the return type is a string.There's a wanting implementation of a sumtype in the standard library (https://dlang.org/phobos/std_variant.html#.Algebraic), and a much better one as a package: https://code.dlang.org/packages/sumtype parent lumberjackstian 6 years ago
There's a wanting implementation of a sumtype in the standard library (https://dlang.org/phobos/std_variant.html#.Algebraic), and a much better one as a package: https://code.dlang.org/packages/sumtype