Expanding CTFE code during compilation
Steven Schveighoffer
schveiguy at gmail.com
Sat Jul 23 00:56:39 UTC 2022
On 7/22/22 3:22 PM, Azi Hassan wrote:
> Oh, interesting syntax. I was thinking something along the lines of
>
> ```D
> template printEnum(...) {
> version(debug) {
> ... // everything we already did
> } else {
> enum printEnum(alias x) = x;
> }
> }
> ```
>
> But I like yours better.
`version(debug)` isn't valid syntax, `debug` is a keyword.
-Steve
More information about the Digitalmars-d-learn
mailing list