On Thu, 21 Aug 2014 11:34:23 +0200 Romain Francois <rom...@r-enthusiasts.com> wrote:
GK> Yep, sorry for the misuse of language. And I do understand going back to GK> GetRNGstate() and PutRNGstate() is a bit old school; but I can definitely GK> confirm that it seems to be safer than resorting do the GK> constructor/destuctor magic. > > Compiler/Destructor is not magic. It is determinism. > > That's like feature #1 of C++. agreed: s/magic/automagic/g > And BTW it is definitely safer than any manual handling. I cannot say that in the current case, as relying on the destructor does seem to create problems (in rare cases, making it even worse!) if objects which are to be returned are instantiated after the RNGScope object. Conditional on the fact the I understood JJ correctly, that is. Manual handling works perfectly. Best, /g _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel