digitalmars.D.learn - Identifying and dealing with deprecated/removed language features
- Jacob Carlborg (10/10) Sep 20 2015 I have a library that needs to check if a type is a typedef. Something l...
- Martin Krejcirik (4/6) Sep 20 2015 __VERSION__ ?
- Jacob Carlborg (6/7) Sep 20 2015 Will only solve identifying if a feature is supported or not. When the
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
Sep 20 2015
Dne 20. 9. 2015 v 11:55 Jacob Carlborg napsal(a):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?__VERSION__ ? -- mk
Sep 20 2015
On 2015-09-20 13:17, Martin Krejcirik wrote:__VERSION__ ?Will only solve identifying if a feature is supported or not. When the features is actually used a string mixin will still be required, as far as I know. -- /Jacob Carlborg
Sep 20 2015