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
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
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:
##