[Rcpp-devel] Casting error from chhecking package on CRAN under C++14, g++

terrance savitsky tds151 at gmail.com
Thu Jan 21 22:44:22 CET 2016


Hi Rcpp experts, The CRAN maintainers inform me that when testing one of my
packages under

g++ -std=gnu++14 (logs with gcc 5.3)

that the following code snippet,

IntegerVector dpr = diff(pr); /* pr is an Rcpp::IntegerVector */
icolvec diffpersons(dpr.begin(), nc - 1, false);

generates the following error:

error: no matching function for call to ‘arma::Col<long long
int>::Col(Rcpp::Vector<13>::iterator, int, bool)’
     icolvec diffpersons(dpr.begin(), nc - 1, false);

where I'm writing (the memory for) an Rcpp:: IntegerVector to an
arma::icolvec. The default width for an Armadillo signed integer under
C++11 and C++14 is 64-bit (long long).  I'd appreciate your insight on
whether there is an alternate approach to casting an arma::icolvec
from an Rcpp::IntegerVector that can deal with a 64-bit integer; for
example, will as<icolvec>() work?


Thank you for your help,


Terrance



-- 
Thank you, Terrance Savitsky

_______________________________________________
Rcpp-devel mailing list
Rcpp-devel at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel



-- 
Thank you, Terrance Savitsky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20160121/cdf128fe/attachment.html>


More information about the Rcpp-devel mailing list