<div dir="auto">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.<div dir="auto"><br></div><div dir="auto">Iñaki</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié., 21 feb. 2024 7:34, Nikhil Garg <<a href="mailto:nikhilgarg.gju@gmail.com">nikhilgarg.gju@gmail.com</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>
_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank" rel="noreferrer">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br>
</blockquote></div>