[Rcpp-commits] r2929 - in pkg/Rcpp: . inst/unitTests/testRcppModule/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 21 18:09:12 CET 2011


Author: edd
Date: 2011-03-21 18:09:12 +0100 (Mon, 21 Mar 2011)
New Revision: 2929

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/inst/unitTests/testRcppModule/src/stdVector.cpp
Log:
protect push_back in stdVector module from being built with g++-4.5 and -std=c++0x


Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2011-03-17 15:01:08 UTC (rev 2928)
+++ pkg/Rcpp/ChangeLog	2011-03-21 17:09:12 UTC (rev 2929)
@@ -1,3 +1,8 @@
+2011-03-21  Dirk Eddelbuettel  <edd at debian.org>
+
+	* inst/unitTests/testRcppModule/src/stdVector.cpp: Protect push_back
+	declaration by #ifdef as it conflicts with -std=c++0x use for g++-4.5
+
 2011-03-17  Dirk Eddelbuettel  <edd at debian.org>
 
 	* inst/include/RcppCommon.h: Condition the typedef for 'long long'

Modified: pkg/Rcpp/inst/unitTests/testRcppModule/src/stdVector.cpp
===================================================================
--- pkg/Rcpp/inst/unitTests/testRcppModule/src/stdVector.cpp	2011-03-17 15:01:08 UTC (rev 2928)
+++ pkg/Rcpp/inst/unitTests/testRcppModule/src/stdVector.cpp	2011-03-21 17:09:12 UTC (rev 2929)
@@ -29,7 +29,7 @@
     
     // exposing the default constructor
     .default_constructor() 
-	
+
     // exposing member functions
     .method( "size", &vec::size)
     .method( "max_size", &vec::max_size)
@@ -37,7 +37,12 @@
     .method( "capacity", &vec::capacity)
     .method( "empty", &vec::empty)
     .method( "reserve", &vec::reserve)
+#if 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 )
 



More information about the Rcpp-commits mailing list