On Saturday, 28 May 2016 at 14:54:13 UTC, Era Scarecrow wrote:
Well here's what i got. Maybe someone else will tell me how i did this wrong...

Using the pragma to output how the lines were being generated i finally figured out why it kept complaining about the stack pointer and 'this'. So adding in a simple check to ignore 'this' entries.

So, final version:

bool areAllFunctionsSafe(T)() {
  foreach(member; __traits(allMembers, T)) {
static if(member!="this" && isCallable!(__traits(getMember, T, member)))
      if (!isSafe!(__traits(getMember, T, member))) return false;
  }
  return true;
}

Reply via email to