digitalmars.D.learn - __VERSION__ and the different compilers
- Mike Parker (10/10) Jul 09 2014 Is it safe to assume that __VERSION__ is the same among DMD, LDC and GDC...
- bearophile (5/7) Jul 09 2014 Right. An alternative solution is to use __traits(compiles) and
- Andrej Mitrovic via Digitalmars-d-learn (4/6) Jul 09 2014 Yes, but not all future compilers might implement this (although I
Is it safe to assume that __VERSION__ is the same among DMD, LDC and GDC when using the equivalent front-end? I want to implement nogc in Derelict in a backward compatible way. The simple thing to do is (at the suggestion of w0rp): static if( __VERSION__ < 2.066 ) enum nogc = 1; I just want to verify that this is sufficient and that I don't need to test for version(DMD) and friends as well. --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
Jul 09 2014
Mike Parker:Is it safe to assume that __VERSION__ is the same among DMD, LDC and GDC when using the equivalent front-end?Right. An alternative solution is to use __traits(compiles) and use nogc inside it. Bye, bearophile
Jul 09 2014
On 7/9/14, Mike Parker via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:Is it safe to assume that __VERSION__ is the same among DMD, LDC and GDC when using the equivalent front-end?Yes, but not all future compilers might implement this (although I hope they will). I think there's also __VENDOR__ IIRC.
Jul 09 2014