Skip to content
Prev 47940 / 63424 Next

CXX_STD and configure.ac in packages

Hi Martin,

Thanks for the patch. I have applied it. I also added CXX1X and friends to the list of approved variables for R CMD config.
So you can now query the existence of C++11 support with `R CMD config CXX1X` (It is empty if C++11 support is not available)
and then take appropriate action in your configure script if, in Dirk's words, you want to do the configure dance.

The philosophy underlying C++ support in R is that there are only two standards - C++98 and C++11 - and that
you should write to one of those standards. Nobody should be writing new code that uses TR1 extensions now: they are
superseded by the new standard.

The map and unordered_map classes are a corner case, as they offer the same functionality but latter has much better
complexity guarantees, so it is tempting to use it when available.  But from a global perspective you should think of
C++98 and C++11 as two different languages.

Martyn