[Rcpp-commits] r557 - in pkg: . inst src/Rcpp/internal

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 2 09:27:32 CET 2010


Author: romain
Date: 2010-02-02 09:27:32 +0100 (Tue, 02 Feb 2010)
New Revision: 557

Modified:
   pkg/NEWS
   pkg/inst/ChangeLog
   pkg/src/Rcpp/internal/wrap.h
Log:
exposing Rcpp::wrap( InputIterator, InputIterator)

Modified: pkg/NEWS
===================================================================
--- pkg/NEWS	2010-02-02 08:19:42 UTC (rev 556)
+++ pkg/NEWS	2010-02-02 08:27:32 UTC (rev 557)
@@ -1,6 +1,12 @@
 
 0.7.5	(under development)
 
+    o 	The range based version of wrap is now exposed at the Rcpp::
+    	level with the following interface : 
+    	wrap( InputIterator first, InputIterator last )
+    	This is dispatched internally to the most appropriate implementation
+    	using traits
+
     o	a new namespace Rcpp::traits has been added to host the various
     	type traits used by wrap
 

Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog	2010-02-02 08:19:42 UTC (rev 556)
+++ pkg/inst/ChangeLog	2010-02-02 08:27:32 UTC (rev 557)
@@ -1,3 +1,10 @@
+2010-02-02  Romain Francois <francoisromain at free.fr>
+
+	* src/Rcpp/wrap.h: The range based wrap function is exposed
+	at the Rcpp:: level. The interface is 
+	wrap( InputIterator first, InputIterator last )
+	and dispatch is performed internally using iterator traits
+	
 2010-02-01  Romain Francois <francoisromain at free.fr>
 
 	* src/traits/wrap_type_traits.h: new namespace Rcpp::traits::

Modified: pkg/src/Rcpp/internal/wrap.h
===================================================================
--- pkg/src/Rcpp/internal/wrap.h	2010-02-02 08:19:42 UTC (rev 556)
+++ pkg/src/Rcpp/internal/wrap.h	2010-02-02 08:27:32 UTC (rev 557)
@@ -413,6 +413,10 @@
 // special cases - FIXME : these are not template specializations of wrap<>
 inline SEXP wrap(const char* const v ){ return Rf_mkString(v) ; } ;
 
+template <typename InputIterator>
+SEXP wrap(InputIterator first, InputIterator last){ return internal::range_wrap( first, last ) ; }
+
+
 // wrap( { ... } ) : disabled for now
 // #ifdef HAS_INIT_LISTS
 // inline SEXP wrap(std::initializer_list<bool> v) { return internal::range_wrap( v.begin() , v.end() ); };



More information about the Rcpp-commits mailing list