[Rcpp-devel] Wrapping a c++ class with singleton using RCPP Module

Iñaki Ucar inaki.ucar at uc3m.es
Wed Feb 21 09:21:34 CET 2024


Could you please provide more details about what you tried so far and what
are the issues you found? A link to a public repo with a test case would be
even better.

Iñaki

El mié., 21 feb. 2024 7:34, Nikhil Garg <nikhilgarg.gju at gmail.com> escribió:

> Hi,
>
> I am looking for some advice or hoping someone can point me in the right
> direction for wrapping a C++ class with singleton using Rcpp. I have been
> using RCPP modules for some of this work but got stuck with a C++ object
> which returns a singleton.
>
> Here is the general structure of the object
>
> class Foo {
>     public:
>         Foo();
>         ~Foo();
>
>         static Foo &getFoo();
>         Foo(Foo const&) = delete;
>         void operator=(Foo const&) = delete;
> }
>
> Regards,
> Nikhil
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20240221/b70ed522/attachment.htm>


More information about the Rcpp-devel mailing list