Friday, 6 September 2013

Probing language features

Probing language features

How do I find out at "compile time" (e.g. using the preprocessor) if the
compiler supports a particular language feature? The concrete example I am
thinking of is the NEWUNIT specifier of Fortran 2008. I would like to do
something like this:
#ifdef HAVE_NEWUNIT
! go ahead and use that
#else
! activate workaround

No comments:

Post a Comment