[Rcpp-commits] r3964 - in pkg/Rcpp: . inst/include/Rcpp/internal

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 14 09:40:12 CET 2012


Author: romain
Date: 2012-11-14 09:40:11 +0100 (Wed, 14 Nov 2012)
New Revision: 3964

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/inst/include/Rcpp/internal/wrap.h
Log:
fix for std::wrap( std::complex<double> )

Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2012-11-14 02:07:26 UTC (rev 3963)
+++ pkg/Rcpp/ChangeLog	2012-11-14 08:40:11 UTC (rev 3964)
@@ -1,3 +1,7 @@
+2012-11-14  Romain Francois <romain at r-enthusiasts.com>
+
+        * include/Rcpp/internal/wrap.h: fix for wrap( std::complex<double> )
+
 2012-11-13  Dirk Eddelbuettel  <edd at debian.org>
 
         * DESCRIPTION: Release 0.10.0

Modified: pkg/Rcpp/inst/include/Rcpp/internal/wrap.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/internal/wrap.h	2012-11-14 02:07:26 UTC (rev 3963)
+++ pkg/Rcpp/inst/include/Rcpp/internal/wrap.h	2012-11-14 08:40:11 UTC (rev 3964)
@@ -357,8 +357,9 @@
 template <typename T>
 inline SEXP primitive_wrap__impl__cast( const T& object, ::Rcpp::traits::true_type ){
 	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<T>::rtype ;
+	typedef typename ::Rcpp::traits::storage_type<RTYPE>::type STORAGE_TYPE ;
 	SEXP x = PROTECT( Rf_allocVector( RTYPE, 1 ) );
-	r_vector_start<RTYPE, typename ::Rcpp::traits::storage_type<RTYPE>::type >(x)[0] = static_cast< typename ::Rcpp::traits::storage_type<RTYPE>::type >(object) ;
+	r_vector_start<RTYPE,STORAGE_TYPE>(x)[0] = caster<T,STORAGE_TYPE>(object) ;
 	UNPROTECT(1);
 	return x;
 }



More information about the Rcpp-commits mailing list