[Issue 24837] Can't version() or static if() to include keys in an enum

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 29 12:17:42 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24837

--- Comment #2 from Max Samukha <maxsamukha at gmail.com> ---
(In reply to Jonathan M Davis from comment #1)
> I would _love_ to be able to do this, but Walter's response has been what it
> often is with version-related stuff - that duplicating the whole thing is
> less error-prone and avoids the huge mess that you often get with #ifdefs in
> C/C++.
> 
> *** This issue has been marked as a duplicate of issue 9761 ***

What's next? Ban 'if's because a programmer can abuse them? I recently had to
port a >500 member C enum and resort, again, to string mixins to work around
this poorly justified limitation.

--


More information about the Digitalmars-d-bugs mailing list