Trick for teasing out static/constness of member in D1?

Bill Baxter wbaxter at gmail.com
Mon Jan 26 19:08:35 PST 2009


I'd like to do something like this:

static if (AType.length is a static constant ) {
      const  has_static_length = true;
}
else static if (AType.length exists but it's not a compile-time constant) {
      const  has_static_length = false;
}
else {
     // there is no .length at all
}


Anyone have a neat trick for this that works in D1?


--bb


More information about the Digitalmars-d-learn mailing list