Re: [Rcpp-devel] Problem with the copy constructor of Rcpp::S4

2012-02-16 Thread Rémi Lebret
Hi Douglas, I've tried that: Rcpp::S4 res(Rcpp::clone(Rcpp::S4(obj.slot("results"))); But it doesn't solve the problem because you actually clone the reference returned by the copy constructor... Rémi Le 16 févr. 2012 à 17:25, Douglas Bates a écrit : > On Thu, Feb 16, 2012 at 9:25 AM, Rémi Le

Re: [Rcpp-devel] Problem with the copy constructor of Rcpp::S4

2012-02-16 Thread Douglas Bates
On Thu, Feb 16, 2012 at 9:25 AM, Rémi Lebret wrote: > Hi, > > I've got some issues by using the copy constructor of the S4 class. > > I want to make a copy of a S4 object but it looks like the copy constructor > returns a reference instead of a new instance of the S4 class. > > I made a dummy exam

[Rcpp-devel] Problem with the copy constructor of Rcpp::S4

2012-02-16 Thread Rémi Lebret
Hi, I've got some issues by using the copy constructor of the S4 class. I want to make a copy of a S4 object but it looks like the copy constructor returns a reference instead of a new instance of the S4 class. I made a dummy example to illustrate my problem: ##