Identifying and dealing with deprecated/removed language features

Jacob Carlborg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 20 02:55:52 PDT 2015


I have a library that needs to check if a type is a typedef. Something like:

static if (is(T == typedef))

But now typedef is deprecated or even removed. I want my library to 
compile with the latest version of DMD without any deprecation warnings 
but at the same time be backwards compatible. What's the best way to 
deal with this?

I guess I can use __traits(compiles) to check if typedef and then insert 
the "static if" with a string mixing. But is there a better way to do this?

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list