[Rcpp-devel] RCPP_MODULE for inheritance class

Romain Francois romain at r-enthusiasts.com
Fri Jun 20 07:21:27 CEST 2014


Please find an answer here. http://stackoverflow.com/questions/24317910/rcpp-module-for-inheritance-class/24320207#24320207


Le 20 juin 2014 à 01:13, Jianyang Zhao <uzhao at ucdavis.edu> a écrit :

> Hello All,
> I got a problem when I try module with inheritance class. Basiclly, I can't compile this part.
> 	using namespace Rcpp;
> 	class_<FPCAreg>("FPCAreg")
> 		.constructor<List, List, double, double, int, bool, bool>()
> 		.field("n", &FPCAreg::n)
>                 ;
> }
> Here FPCAreg is a inheritance class based on FPCA class, and "n" is defined in FPCA. No matter I use ".field("n", &FPCAreg::n)" or ".field("n", &FPCA::n)". When I use ".field("n", &FPCAreg::n)", the error message is "no matching function for call to blablabla", and for ".field("n", &FPCA::n)", that's same but different class name. Is there any suggestion?
> Thanks,
> Jianyang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140620/90ef6ed5/attachment.html>

More information about the Rcpp-devel mailing list