If the VariantN object holds a value of the exact type T, returns a pointer to that value. Otherwise, returns null. In cases where T is statically disallowed, peek will not compile.
Variant a = 5; auto b = a.peek!(int); assert(b !is null); *b = 6; assert(a == 6);
See Implementation
If the VariantN object holds a value of the exact type T, returns a pointer to that value. Otherwise, returns null. In cases where T is statically disallowed, peek will not compile.