On Tuesday, 19 February 2019 at 05:50:04 UTC, yisooan wrote:
I wonder there is the way as I said in the title. For instance,
in C,
#define indexInvalidException Exception("The index is invalid")
/* Do something with the macro here */
if (false)
indexInvalidException;
This is allowed.
But
On Tuesday, 19 February 2019 at 06:16:59 UTC, Mike Parker wrote:
```
Exception invalidIndexException() { throw new Exception("Index
is invalid"); }
Eh, that should be:
void invalidIndexException() {...}
On Tuesday, 19 February 2019 at 05:50:04 UTC, yisooan wrote:
This is allowed.
But I want to do the exact same thing in D. I have already
tried some expressions with alias? but it doesn't work.
alias can't be used for expressions.
Would you help me, please?
There's nothing exactly
I wonder there is the way as I said in the title. For instance,
in C,
#define indexInvalidException Exception("The index is invalid")
/* Do something with the macro here */
if (false)
indexInvalidException;
This is allowed.
But I want to do the exact same thing in D. I have already tried