On Mon, Sep 6, 2010 at 18:47, Pelle <pelle.mans...@gmail.com> wrote: > On 09/04/2010 02:11 PM, Simen kjaeraas wrote: > >> Is there a way you could write an isStatic(expr) template? Using >>> >> >> template isStatic( alias T ) { >> enum isStatic = is( char[1+T] ); >> } >> >> unittest { >> int n = 3; >> assert( !isStatic!n ); >> assert( isStatic!1 ); >> enum r = 5; >> assert( isStatic!r ); >> } >> > > enum s = "Hello"; > > assert (isStatic!s); > > Gonna need more work than that. >
Why? That's exactly the behavior we want, or so it seems to me.