www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Test if member is static variable

reply "Temtaime" <temtaime gmail.com> writes:
Hi !

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, 


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

Thanks !
Jun 01 2014
parent "Temtaime" <temtaime gmail.com> writes:
Also second question is what are better to use, current template 
recursion-based code or rewrite it to CTFE ?
Jun 02 2014