btw, Rcpp::rout will need to properly handle the following ostream member functions: .flags(), .precision(), .width(), .fill(), .flush(), .unsetf(), .setf()
ie. they can't just be "no-op" functions. See "include/armadillo_bits/arma_ostream_meat.hpp" as to how these member functions are used. 2011/11/17 c s <conradsand.a...@gmail.com>: > 2011/11/17 Romain François <rom...@r-enthusiasts.com>: >>> I'm open to looking at solutions which provide a different default >>> stream, as long as it's a C++ std::ostream. >> >> That would work for us, as Dirk recently commited a contributed patch >> to add Rcpp::rout which is an ostream that forwards to R's console >> printing facilities. > > Ok, in that case I'll add a define in config.hpp, along these lines: > > #if !defined(ARMA_DEFAULT_OSTREAM) > #define ARMA_DEFAULT_OSTREAM std::cout > #endif > > You can then pre-define ARMA_DEFAULT_OSTREAM to Rcpp::rout. > How does this solution sound ? > _______________________________________________ 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