I'm generating some code. Some of the generated types need to be
overridden, so I define them manually at the top of the generated
file. Then I need to guard against redefining the identifier
(type/value/function) later on, in the generated code.
I'm currently using `static if (!__traits(compiles, thingy)) {`
to avoid redefining things twice.
Of course the proper fix is to not generate code for the
identifiers which are already manually defined, and not generate
any `static if`s at all, but until then, is there a faster way
than `static if (__traits(compiles, ...` to check if a
type/value/function has already been defined?
- Fastest way to check using if ident... drathier via Digitalmars-d-learn
-