stonemaster/phobos — comment on commit 9920a832272188cd24b948fc4dd7fce77866dd39
File: std/variant.d line 1534
By stonemaster:

I first thought about this solution too, but it would have two problems:

1. If not all types are handled by the visitor the template won't be instantied and the user doesn't really know why. At the moment this is handled by static asserts in the body of applyVisitor which generate more precise messages about the missing type. Especially in long type lists this might be an advantage.
2. T.init won't work with opCall overloads using ref T.. Maybe there is some compile time expression that is accepted in ref cases too?