<div dir="ltr"><div>Hi,</div><div><br></div><div>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.<br></div><div><br></div><div>Here is the general structure of the object</div><div><br></div><div></div><div><span style="font-family:monospace">class Foo {</span></div><div><span style="font-family:monospace">    public:</span></div><div><span style="font-family:monospace">        Foo();</span></div><div><span style="font-family:monospace">        ~Foo();</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">        static Foo &getFoo();</span></div><div><span style="font-family:monospace">        Foo(Foo const&) = delete;</span></div><div><span style="font-family:monospace">        void operator=(Foo const&) = delete;<br></span></div><div><span style="font-family:monospace">}</span></div><br><div>Regards,</div><div>Nikhil<br></div><div><span class="gmail_signature_prefix"></span></div></div>