On Wed, Jan 9, 2013 at 10:57 PM, David <[email protected]> wrote: >> Like this? >> >> struct MyType(Elem) >> { >> Elem[] inner; >> alias inner this; >> } >> >> void main() >> { >> static assert(is(MyType!float _ : T[], T)); >> } >> > > And how does that work for a static array?
For a static array, the generic type is T[n], for some T and a size_t n. So: static assert(is(MyType!float _ : T[n], T, size_t n));
