[Rcpp-commits] r412 - in pkg: inst/discovery src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jan 20 08:38:00 CET 2010
Author: romain
Date: 2010-01-20 08:37:59 +0100 (Wed, 20 Jan 2010)
New Revision: 412
Modified:
pkg/inst/discovery/cxx0x.R
pkg/src/RcppCommon.cpp
pkg/src/RcppCommon.h
Log:
remove use of HAS_VARIADIC_TEMPLATES in cpp file
Modified: pkg/inst/discovery/cxx0x.R
===================================================================
--- pkg/inst/discovery/cxx0x.R 2010-01-20 03:19:58 UTC (rev 411)
+++ pkg/inst/discovery/cxx0x.R 2010-01-20 07:37:59 UTC (rev 412)
@@ -23,10 +23,10 @@
local({
flag <- function(){
- want.cxx0x <- Sys.getenv( "RCPP_WANT_CXX0X" , unset = "" )
- if( want.cxx0x != "yes" ){
- return(invisible(NULL))
- }
+ # want.cxx0x <- Sys.getenv( "RCPP_WANT_CXX0X" , unset = "" )
+ # if( want.cxx0x != "yes" ){
+ # return(invisible(NULL))
+ # }
cxx0x.code <- '
#include <R.h>
Modified: pkg/src/RcppCommon.cpp
===================================================================
--- pkg/src/RcppCommon.cpp 2010-01-20 03:19:58 UTC (rev 411)
+++ pkg/src/RcppCommon.cpp 2010-01-20 07:37:59 UTC (rev 412)
@@ -41,25 +41,6 @@
Rprintf("%s:%d %s\n", file, line, expression);
}
-SEXP test_variadic() {
- SEXP res = PROTECT( Rf_allocVector(INTSXP, 5) ) ;
-#ifdef HAS_VARIADIC_TEMPLATES
- INTEGER(res)[0] = variadic_length() ;
- INTEGER(res)[1] = variadic_length(1) ;
- INTEGER(res)[2] = variadic_length(1, 3.3) ;
- INTEGER(res)[3] = variadic_length(1, "foo", 'f') ;
- INTEGER(res)[4] = variadic_length(1, 2, 2.3f, "foo", std::string("foobar") ) ;
-#else
- INTEGER(res)[0] = 0 ;
- INTEGER(res)[1] = 1 ;
- INTEGER(res)[2] = 2 ;
- INTEGER(res)[3] = 3 ;
- INTEGER(res)[4] = 4 ;
-#endif
- UNPROTECT(1) ;
- return res;
-}
-
SEXP canUseCXX0X(){
#ifdef __GNUC__
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -85,13 +66,7 @@
#else
LOGICAL(cap)[1] = FALSE ;
#endif
-#ifdef __GNUC__
LOGICAL(cap)[2] = TRUE ;
-#else
- /* just because I don't know */
- LOGICAL(cap)[2] = FALSE ;
-#endif
-
SET_STRING_ELT(names, 0, Rf_mkChar("variadic templates") ) ;
SET_STRING_ELT(names, 1, Rf_mkChar("initializer lists") ) ;
SET_STRING_ELT(names, 2, Rf_mkChar("exception handling") ) ;
Modified: pkg/src/RcppCommon.h
===================================================================
--- pkg/src/RcppCommon.h 2010-01-20 03:19:58 UTC (rev 411)
+++ pkg/src/RcppCommon.h 2010-01-20 07:37:59 UTC (rev 412)
@@ -81,7 +81,6 @@
int variadic_length( const Args&... args) { return sizeof...(Args) ; }
#endif
-RcppExport SEXP test_variadic() ;
RcppExport SEXP canUseCXX0X() ;
RcppExport SEXP test_named() ;
RcppExport SEXP capabilities() ;
More information about the Rcpp-commits
mailing list