tryVisit

Behaves as visit but doesn't enforce at compile time that all types can be handled by the visiting functions.

alias tryVisit(visitors...) = visitImpl!(naryFun!visitors, Exhaustive.exception, false)

Throws

Exception if naryFun!visitors can't be called with provided arguments

Examples

alias Number = Variant!(int, double);

Number x = 23;

assert(x.tryVisit!((int v) => true));

Meta