On 15 September 2013 at 22:08, Simon Zehnder wrote: | Would possibly something like | | defined(__clang__) && defined(__cplusplus) && (__cplusplus == 201103L) | defined(__clang__) && defined(__STDC_VERSION__) && (__STDC_VERSION__ == 201112L) | | do? The values given by g++ and clang++ to __cplusplus in C++11 mode match, as well as the values given by gcc and clang to __STDC_VERSION__ in C11 mode.
We settled on requiring clang as well as LP64: #ifdef __GNUC__ #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined (__clang__) && defined(__LP64__)) #ifdef __LONG_LONG_MAX__ __extension__ typedef long long int rcpp_long_long_type; __extension__ typedef unsigned long long int rcpp_ulong_long_type; #define RCPP_HAS_LONG_LONG_TYPES #endif #endif #endif Seems to work for g++ and clang++. Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel