[Rcpp-commits] r4257 - in pkg/Rcpp: . inst/include/Rcpp inst/include/Rcpp/vector

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Feb 18 08:55:24 CET 2013


Author: romain
Date: 2013-02-18 08:55:23 +0100 (Mon, 18 Feb 2013)
New Revision: 4257

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/inst/include/Rcpp/String.h
   pkg/Rcpp/inst/include/Rcpp/vector/string_proxy.h
Log:
make clang happy

Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2013-02-17 21:13:32 UTC (rev 4256)
+++ pkg/Rcpp/ChangeLog	2013-02-18 07:55:23 UTC (rev 4257)
@@ -1,3 +1,9 @@
+2013-02-18 Romain Francois <romain at r-enthusiasts.com>
+
+        * include/Rcpp/vector/string_proxy.h : only declare operator+= 
+        * include/Rcpp/String.h : define string_proxy::operator+=, now that 
+        String is defined. 
+
 2013-02-15 JJ Allaire <jj at rstudio.org>
 
         * R/Attributes.R: Merge existing values of build related

Modified: pkg/Rcpp/inst/include/Rcpp/String.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/String.h	2013-02-17 21:13:32 UTC (rev 4256)
+++ pkg/Rcpp/inst/include/Rcpp/String.h	2013-02-18 07:55:23 UTC (rev 4257)
@@ -390,8 +390,18 @@
             return s.get_sexp() ;    
         }
         
+	    template <int RTYPE>
+	    template <typename T>
+        string_proxy<RTYPE>& string_proxy<RTYPE>::operator+=(const T& rhs) {
+        	String tmp = get() ;
+        	tmp += rhs ;
+        	set( tmp ) ;
+        	return *this ;
+        }
+		
 	}
     
+	
 	template <>
     inline SEXP wrap<Rcpp::String>( const Rcpp::String& object) {
     	RCPP_STRING_DEBUG( "wrap<String>()" ) ;

Modified: pkg/Rcpp/inst/include/Rcpp/vector/string_proxy.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/vector/string_proxy.h	2013-02-17 21:13:32 UTC (rev 4256)
+++ pkg/Rcpp/inst/include/Rcpp/vector/string_proxy.h	2013-02-18 07:55:23 UTC (rev 4257)
@@ -101,12 +101,7 @@
          * element this proxy refers to.
          */
         template <typename T>
-        string_proxy& operator+=(const T& rhs){
-        	String tmp = get() ;
-        	tmp += rhs ;
-        	set( tmp ) ;
-        	return *this ;
-        }
+        string_proxy& operator+=(const T& rhs) ;
 		
 		/**
 		 * rhs use. Retrieves the current value of the 



More information about the Rcpp-commits mailing list