[Rcpp-devel] RcppModules with templated class

Dr Gregory Jefferis jefferis at mrc-lmb.cam.ac.uk
Mon Sep 1 20:45:54 CEST 2014

Dear Romain,

On 1 Sep 2014, at 17:32, Romain Francois wrote:

> This looks related to what RCPP_EXPOSED_CLASS does, perhaps because 
> your class comes from a template, you could try 
> RCPP_EXPOSED_CLASS_NODECL instead. The only difference is that it does 
> not add the class forward declaration, so you'd have to have it after 
> you have defined or declared your class.

Thank you. You are exactly right, this was the problem and the solution.

I still need to make an additional adjustment to my code because I had 
separated the class declaration and instantiation, which can be 
problematic for template classes, either by explicitly instantiating the 
template or by moving everything into the header file.

Best wishes,


Gregory Jefferis, PhD                   Tel: 01223 267048
Division of Neurobiology
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge, CB2 OQH, UK


More information about the Rcpp-devel mailing list