testing for deprecation
Cauterite via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Sep 1 04:11:15 PDT 2016
How does one test whether a symbol is deprecated? I would have
expected something like: __traits(isDeprecated, foo).
In the compiler we have Dsymbol.isDeprecated, is that not
accessible in any way from code?
The only solution I can think of is compiling with -de and using
__traits(compiles, {alias x = foo;})
which actually does seem to work. Pretty lousy though.
More information about the Digitalmars-d-learn
mailing list