On Wednesday, 23 March 2016 at 19:18:50 UTC, Chris Wright wrote:
Consider the `coerce` method: http://dpldocs.info/experimental-docs/std.variant.VariantN.coerce.htmlExample: import std.variant; class A {} class B : A {} void main() { A b = new B; auto bb = Variant(b).coerce!B; assert (bb !is null); }
Magnificent! Thank you ! :)