Automatic overrides
Automatic override of std::cout and std::thread
There are preprocessor options to replace all occurrences of std::cout, std::cerr, and std::thread with calls to RcppThread::Rcout, RcppThread::Rcerr, and RcppThread::Thread (provided that the RcppThread headers are included first). To enable this, use
#define RCPPTHREAD_OVERRIDE_COUT 1 // std::cout override #define RCPPTHREAD_OVERRIDE_CERR 1 // std::cerr override #define RCPPTHREAD_OVERRIDE_THREAD 1 // std::thread override
before including the RcppThread headers.