EDIT: Actually, the `return n ? : ;` thing could get you into trouble, as you'll run into a "statement not reachable" error for the trailing `return -1;` on release builds. Instead, keep it to:
```D
if (n) return ...;
```