<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>This is not supported currently. It might be in the future when someone finds time or funding. </div><div><br></div><div>One thing that could be done is to create a simple wrapper function around it and expose this with the module. You wont get the associarion with the class though. </div><div><br></div><div>double wrapper_myFunction(){</div><div>    return Foo::myFunction() ;</div><div>}</div><div><br></div><div>We might support direct syntactic sugar for exposing static functions later, but i'm not sure the concept of staric functions is supported by reference classes which is the texhnology we use to expose module classes. </div><div><br></div><div>Romain</div><div><br>Le 9 mai 2013 à 16:47, Julien Duvanel <<a href="mailto:julien.duvanel@epfl.ch">julien.duvanel@epfl.ch</a>> a écrit :<br><br></div><blockquote type="cite"><div>
                <div>
                    Hello,
                </div><div><br></div><div>First of all, thanks for all the Rcpp*. It's very helpful.</div><div><br></div><div>I have a small question, and I can't (unfortunately) find the answer over the internet. I'm trying to do this :</div><div><br></div><div>class Foo {</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>public:</div><div><span class="Apple-tab-span" style="white-space:pre">              </span>double <b>static</b> myFunction();</div><div>};</div><div><br></div><div>And then, use the RCPP_MODULE :</div><div><br></div><div>RCPP_MODULE(mod_Foo) {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>class_<Foo>("Foo")</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">  </span>.method("myFunction", &Foo::MyFunction", "bla bla bla")</div><div>}</div><div><br></div><div>Unfortunately, it doesn't compile and gives me the following error :</div><div><br></div><div><div>integration.h:82: error: no matching function for call to ‘Rcpp::class_<NewModel>::method(const char [12], Rcpp::NumericVector (*)(Rcpp::NumericVector, Rcpp::NumericVector, double, double, double, double, int), const char [37])’</div><div><br></div><div>Maybe it just works as intended, but I haven't found anything inside the documentation. (It works when I remove the static). Has anybody an idea ?</div><div><br></div><div>Thank you very much and have a nice day,</div><div><br></div><div>Julien</div></div>
                <div></div>
            </div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Rcpp-devel mailing list</span><br><span><a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a></span><br><span><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></span></div></blockquote></body></html>