<div dir="ltr"><div class="gmail_quote"><br><br><br><div dir="ltr">Hi Rcpp experts, The CRAN maintainers inform me that when testing one of my packages under <div><br clear="all"><div><span style="font-size:12.8px">g++ -std=gnu++14 (logs with gcc 5.3)</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">that the following code snippet,</span></div><div><span style="font-size:12.8px"><br></span></div><div><div><span style="font-size:12.8px">IntegerVector dpr = diff(pr); /* pr is an Rcpp::IntegerVector */</span></div><div><span style="font-size:12.8px">icolvec diffpersons(dpr.begin(), nc - 1, false);</span></div></div><div><br></div><div>generates the following error:</div><div><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">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);</pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;white-space:normal">where I'm writing (the memory for) an Rcpp:: IntegerVector to an arma::icolvec. </span><span style="white-space:normal;font-family:arial,sans-serif;color:rgb(34,34,34)">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?</span></pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="white-space:normal;font-family:arial,sans-serif;color:rgb(34,34,34)"><br></span></pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="white-space:normal;font-family:arial,sans-serif;color:rgb(34,34,34)">Thank you for your help,</span></pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="white-space:normal;font-family:arial,sans-serif;color:rgb(34,34,34)"><br></span></pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="white-space:normal;font-family:arial,sans-serif;color:rgb(34,34,34)">Terrance</span></pre></div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div>-- <br><div>Thank you, Terrance Savitsky</div>
</font></span></div></div>
<br>_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Thank you, Terrance Savitsky</div>
</div>