Guys,

I posted this on R-help and Dirk kindly pointed out that this list is a much 
better place for this sort of questions...

I was wondering whether anyone experimented with Rcpp and static variables. I 
remember reading that Rcpp is essentially stateless. That makes sense. However 
I just run a piece of code that contains a static STL structure, surprisingly  
it seems that those static variables are preserved...

The question is, can we use static variable to reliably preserve state between 
Rcpp calls? If this is the case, this should be a better way to store state 
than by passing state variables between R and C++.

Cheers,

//Giuseppe

---- MAKO ----
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the sender immediately by 
e-mail and delete this e-mail from your system. Please note that any views or 
opinions presented in this email are solely those of the author and do not 
necessarily represent those of the Mako Group. If you are not the intended 
recipient you are notified that disclosing, copying, distributing or taking any 
action with respect to the contents of this information is strictly prohibited. 
Finally, the recipient should check this email and any attachments for the 
presence of viruses. The Mako Group accepts no liability for any damage caused 
by any virus transmitted by this email.
For important disclosures please click 
<<http://www.makoglobal.com/UKRegulatoryNotice.htm>>
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to