object of class B invoking constructor that
>>> accepts a shared-pointer to object of class A.
I am looking for the equivalent in R (or at least a close enough idiom).
Thanks
suresh
____
From: Dirk Eddelbuettel
To: Suresh Easwar
Cc: "rcpp-d
How does one invoke class methods via XPtr objects in R? I get this error:
Error in aptr$f : object of type 'externalptr' is not subsettable:
cpp file:
#include
struct A {
void f() {}
};
typedef Rcpp::XPtr APtr;
APtr getAPtr()
{
return APtr(new A);
}
struct B {
B(APtr) { }
};
RCPP_MODULE(mytest