Compiler version at compile-time

David Eagen davideagen at mailinator.com
Tue Mar 11 19:53:41 PDT 2014


On Wednesday, 12 March 2014 at 02:46:30 UTC, David Eagen wrote:
> Is there a way to determine the compiler version at compile 
> time? Something like:
>
> static if(DMD_VERSION >= 2.066) {
>   virtual int foo();
> } else {
>   int foo();
> }

Naturally I found it as soon as I posted....

std.compiler : version_major, version_minor;


More information about the Digitalmars-d-learn mailing list