[Issue 20982] Add a pragma to suppress deprecation messages
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 27 14:19:37 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20982
--- Comment #7 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to Stanislav Blinov from comment #6)
> (In reply to Andrei Alexandrescu from comment #2)
> > Another idea from Stefan was to control this programmaticaly:
> >
> > static if (deprecated(symbol)) {
> > ... avoid ...
> > }
>
> Yeah, we can kind of do this already, though it's a mouthful:
>
> static foreach (name; __traits(allMembers, Foo))
> {
> static if (!__traits(isDeprecated, __traits(getMember, Foo, name)))
> {{
> alias sym = __traits(getMember, Foo, name);
> }}
> }
Forgot about that, thanks!
--
More information about the Digitalmars-d-bugs
mailing list