On Sun, Jan 6, 2013 at 1:36 PM, David <[email protected]> wrote:
> Thanks for your answers, but:
>
> > Exactly. The std.traits traits are testing for exact types. If you want
> to
> > test for implicit conversion, then use the : operator. e.g.
> >
> > static assert(is(OhWhy!float : float[]));
>
> "OyWhy" is a templated struct for a reason, I have no idea which type of
> array is "alias this'ed" is there a way I can check if it's implicitly
> convertable to any array type with some `is` magic I am not aware of?
>
>
Like this?
struct MyType(Elem)
{
Elem[] inner;
alias inner this;
}
void main()
{
static assert(is(MyType!float _ : T[], T));
}