There is currently no way to test whether a particular symbol is deprecated. This isn't commonly needed, but it can matter when doing introspection on all of the symbols within a module or class and generating code based on the list of symbols, since skipping deprecated symbols in those cases would be required to avoid creating deprecation warnings, and if someone actually used -de, then the code could not compile because of the inadvertent use of deprecated symbols, and there would be no way to avoid using those deprecated symbols, since there's currently no way to introspect whether a symbol is deprecated or not. functionAttributes could be improved to include deprecated, but that would only cover functions, and just about any symbol can be deprecated, so I would suggest simply adding a new trait to do the test. e.g. __traits(isDeprecated, symbol).
Ditto for @future.
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/9e131398d7f8c7a296fecda942f77c336c7bd611 fix issue 17791 - add __traits(deprecated, symbol) https://github.com/dlang/dmd/commit/70d909eea541d528bb4835bef30db8a7d889ed1b Merge pull request #7178 from dunkyp/master fix issue 17791 - add __traits(deprecated, symbol)
> Ditto for @future https://issues.dlang.org/show_bug.cgi?id=17878
dlang/dmd pull request #12093 "[dmd-cxx] Backport more recent traits to the C++ port" was merged into dmd-cxx: - 349f960f54688b70a38f3e40bd2df5b67f5dbafc by dunkyp: [dmd-cxx] fix issue 17791 - add __traits(deprecated, symbol) https://github.com/dlang/dmd/pull/12093