"Steve Teale" <[email protected]> wrote in message
news:[email protected]...
>I think I remember seeing that std.variant is being updated.
>
> Is there some way that an efficient test could be slipped in there that
> would work in templates. The best my fuzzy brain can come up with this
> morning is not wonderful:
>
> (typeof(target).stringof.indexOf("VariantN!(maxSize)") == 0)
>
If there isn't already one, it would be easy to add:
enum is_std_variant_Variant = true;
static if(traits(_compiles, target.is_std_variant_Variant)) {}
Although I would think the language itself would have some way to check if a
type is an instantiation of a particular templated type...