Checking Compiler version in code?
H. S. Teoh
hsteoh at quickfur.ath.cx
Thu Dec 5 11:41:35 PST 2013
On Thu, Dec 05, 2013 at 07:40:51PM +0100, Jeremy DeHaan wrote:
> Hey all,
>
> I was wondering if there was a way to check the compiler version
> when running code. My project uses 2.064 and other people that go to
> use it will get errors if they haven't upgraded yet, and I'd like to
> make a check before hand so that if need be I can have a "Please
> upgrade to the most recent compiler" message show up or something.
[...]
static if (__VERSION__ < 2064L)
static assert(0, "Please upgrade to version 2.064 or later");
T
--
ASCII stupid question, getty stupid ANSI.
More information about the Digitalmars-d-learn
mailing list