Hi Watal,
On 26 October 2018 at 23:36, Watal M. Iwasaki wrote: | Is it possible for Rcpp to do some pre-execution hook before user code? For | example, if Rcpp system can hijack the std::cout buffer by executing | `std::cout.rdbuf(Rcpp::Rcout.rdbuf())` automatically, then Rcpp users (and | external libraries) no longer have to care about Rcout, and can just stick | to std::cout. Sorry, but we need the opposite (which is what Rcpp::Rcout does): we need to get what _would otherwise go to std::cout_ and feed it to Rcpp::Rcout which then hands it to R's buffered i/o. That is the whole underlying reason -- see the as always very detailed "Writing R Extensions" manual for a bit more. Automating that (ie replacing std::cout by Rcpp::Rcout) is what is needed. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ 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