[Issue 20982] Add a pragma to suppress deprecation messages

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 27 08:49:07 UTC 2020


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

Richard Manthorpe <rmanth at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rmanth at gmail.com

--- Comment #5 from Richard Manthorpe <rmanth at gmail.com> ---
Scoped pragmas using push and pop is definitely the most robust pragma
solution. This is a very common pattern in C++ compilers and could be a useful
pattern for other things too.

While excluding deprecated symbols from __traits(allMembers) (and presumably
also __traits(getOverloads)), or something like a deprecated(symbol) would help
avoid accidentally dealing with deprecated code during introspection, there are
other cases that I think only the pragma can help with. For example, we have a
library that has test cases using creal because we need to know it works with
complex primitives for compatibility. We know it's deprecated and we don't need
to be told about it all the time.

--


More information about the Digitalmars-d-bugs mailing list