contains

Check if an instance of a sumtype contains the specific type.

This is from the D forum by Paul Backus, the author of sumtype.

bool
contains
(
T
ST
)
(
ST st
)

Examples

assert(someType.contains!int);

Meta