[Rcpp-commits] r2999 - pkg/Rcpp/inst/unitTests/testRcppModule/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Apr 12 10:31:08 CEST 2011


Author: romain
Date: 2011-04-12 10:31:07 +0200 (Tue, 12 Apr 2011)
New Revision: 2999

Modified:
   pkg/Rcpp/inst/unitTests/testRcppModule/src/stdVector.cpp
Log:
trying somethiong

Modified: pkg/Rcpp/inst/unitTests/testRcppModule/src/stdVector.cpp
===================================================================
--- pkg/Rcpp/inst/unitTests/testRcppModule/src/stdVector.cpp	2011-04-12 08:25:53 UTC (rev 2998)
+++ pkg/Rcpp/inst/unitTests/testRcppModule/src/stdVector.cpp	2011-04-12 08:31:07 UTC (rev 2999)
@@ -22,6 +22,7 @@
 }
 
 void vec_resize( vec* obj, int n){ obj->resize( n ) ; }
+void vec_push_back( vec* obj, double x ){ obj->push_back( x ); }
 
 RCPP_MODULE(stdVector){
     using namespace Rcpp ;
@@ -35,16 +36,9 @@
     // exposing member functions
     .method( "size", &vec::size)
     .method( "max_size", &vec::max_size)
-    .method( "resize", &vec_resize)
     .method( "capacity", &vec::capacity)
     .method( "empty", &vec::empty)
     .method( "reserve", &vec::reserve)
-#ifdef IS_GCC_450_OR_LATER
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
-      // cf C++ header file bits/stl_vector.h
-    .method( "push_back", &vec::push_back )
-#endif
-#endif
     .method( "pop_back", &vec::pop_back )
     .method( "clear", &vec::clear )
 
@@ -52,13 +46,15 @@
     .const_method( "back", &vec::back )
     .const_method( "front", &vec::front )
     .const_method( "at", &vec::at )
-
+    
     // exposing free functions taking a std::vector<double>*
     // as their first argument
     .method( "assign", &vec_assign )
     .method( "insert", &vec_insert )
     .method( "as.vector", &vec_asR )
-
+    .method( "push_back", &vec_push_back )
+    .method( "resize", &vec_resize)
+    
     // special methods for indexing
     .const_method( "[[", &vec::at )
     .method( "[[<-", &vec_set )



More information about the Rcpp-commits mailing list