[Rcpp-commits] r3035 - pkg/RcppArmadillo/inst/include/armadillo_bits

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 25 23:45:16 CEST 2011


Author: edd
Date: 2011-05-25 23:45:11 +0200 (Wed, 25 May 2011)
New Revision: 3035

Modified:
   pkg/RcppArmadillo/inst/include/armadillo_bits/typedef_u64.hpp
Log:
only define u64 as unsigned long long when we have c++0x support for g++


Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/typedef_u64.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/typedef_u64.hpp	2011-05-25 01:40:45 UTC (rev 3034)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/typedef_u64.hpp	2011-05-25 21:45:11 UTC (rev 3035)
@@ -45,8 +45,16 @@
     
   #elif defined(ULLONG_MAX)
     
-    typedef unsigned long long u64;
-    
+    // safer fallback
+    typedef unsigned long u64;
+
+    // if GNU g++ and -std=c++0x is defined, we can use unsigned long long
+    #ifdef __GNUC__
+    #ifdef __GXX_EXPERIMENTAL_CXX0X__
+      typedef unsigned long long u64;
+    #endif    
+    #endif    
+
     static const u64  max   = 0xFFFFFFFFFFFFFFFF;
     static const bool trunc = false;
   



More information about the Rcpp-commits mailing list