On Wednesday, 25 September 2019 at 20:35:55 UTC, Boris Carvajal
wrote:
On Wednesday, 25 September 2019 at 14:20:00 UTC, Anonymouse
wrote:
I added some deprecations in my project and am going through
my templates trying to silence the warnings that suddenly
popped up. This template works, but it triggers deprecation
warnings when I am actively trying to avoid them.
This code seems to work for classes too and even with DMD "-de"
compiler switch.
template isMemberDeprecated(T, string name)
{
enum isMemberDeprecated = mixin(q{__traits(isDeprecated, },
T, ".", name, q{)});
}
https://run.dlang.io/is/iQbxOC
I think I can work with this, thanks!