Re: Test if member is static variable

2014-06-02 Thread Temtaime via Digitalmars-d-learn
Also second question is what are better to use, current template 
recursion-based code or rewrite it to CTFE ?


Test if member is static variable

2014-06-01 Thread Temtaime via Digitalmars-d-learn

Hi !
http://dpaste.dzfl.pl/e21082716396

Is there a way to optimize

static if(is(typeof(__traits(getMember, T, name).offsetof)) == 
false  is(FunctionTypeOf!(__traits(getMember, T, name)) == 
function) == false  __traits(compiles, __traits(getMember, T, 
name)))


?

I think there shoult be __traits(isStaticVariable), but there's 
not.


Thanks !