Re: [Rcpp-devel] operator<< issues

2018-03-20 Thread Dirk Eddelbuettel
On 20 March 2018 at 11:42, Iñaki Úcar wrote: | I may have my own reasons for that, but that's not the point here. The | point is that I expected a homogeneous behaviour across Rcpp classes | when any object is passed to operator<< (i.e., print *something*). | | By grepping the source, I discovere

Re: [Rcpp-devel] operator<< issues

2018-03-20 Thread Iñaki Úcar
2018-03-20 4:33 GMT+01:00 Tim Keitt : > Why not something like: > > Rcpp::sourceCpp(code=' > #include >using Rcpp::Rcout; > >// [[Rcpp::export]] >void print_addr(SEXP x){ > Rcout << static_cast(x) << std::endl; > }') > > I'm not sure why one would expect Rcpp types t

Re: [Rcpp-devel] operator<< issues

2018-03-19 Thread Tim Keitt
http://www.keittlab.org/ On Wed, Mar 14, 2018 at 12:51 PM, Iñaki Úcar wrote: > Hi all, > > I'm not sure whether this is a bug or not, so I think this is the > right place to start with. Consider the following code: > > Rcpp::sourceCpp(code=' > #include > using namespace Rcpp; > > // [[Rcp

Re: [Rcpp-devel] operator<< issues

2018-03-19 Thread Dirk Eddelbuettel
On 19 March 2018 at 08:24, Iñaki Úcar wrote: | Hi -- I hope my last email didn't hit the spam folder. :-) It didn't but it is a little hard to say anything here. Sometimes the compiler needs help with disambiguation as you said. Dirk | Iñaki | | 2018-03-14 18:51 GMT+01:00 Iñaki Úcar : | > Hi

Re: [Rcpp-devel] operator<< issues

2018-03-19 Thread Iñaki Úcar
Hi -- I hope my last email didn't hit the spam folder. :-) Iñaki 2018-03-14 18:51 GMT+01:00 Iñaki Úcar : > Hi all, > > I'm not sure whether this is a bug or not, so I think this is the > right place to start with. Consider the following code: > > Rcpp::sourceCpp(code=' > #include > using nam

[Rcpp-devel] operator<< issues

2018-03-14 Thread Iñaki Úcar
Hi all, I'm not sure whether this is a bug or not, so I think this is the right place to start with. Consider the following code: Rcpp::sourceCpp(code=' #include using namespace Rcpp; // [[Rcpp::export]] void print_fun(Function x) { Rcout << x << std::endl; } // [[Rcpp::export]