[Rcpp-commits] r1210 - pkg/RcppGSL/inst/include

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 12 14:54:39 CEST 2010


Author: romain
Date: 2010-05-12 14:54:39 +0200 (Wed, 12 May 2010)
New Revision: 1210

Modified:
   pkg/RcppGSL/inst/include/RcppGSLForward.h
Log:
propagate operators to RcppGSL::vector_view

Modified: pkg/RcppGSL/inst/include/RcppGSLForward.h
===================================================================
--- pkg/RcppGSL/inst/include/RcppGSLForward.h	2010-05-12 12:34:01 UTC (rev 1209)
+++ pkg/RcppGSL/inst/include/RcppGSLForward.h	2010-05-12 12:54:39 UTC (rev 1210)
@@ -107,6 +107,13 @@
 	vector_view( gsltype* x) : data(x) {}                                        \
 	~vector_view(){  }                                                           \
 	operator gsltype*(){ return data ; }                                         \
+	gsltype* operator->() const { return data; }                                 \
+	gsltype& operator*() const { return *data; }                                 \
+	vector_view( const vector_view& x) : data(x.data)  {}                        \
+	vector_view& operator=(const vector_view& other) {                           \
+		data = other.data ;                                                      \
+		return *this ;                                                           \
+	}                                                                            \
 } ;                                                                             \
 
 // FIXME: the private copy ctors and assignment operator are 



More information about the Rcpp-commits mailing list