Displaying 1 result from an estimated 1 matches for "optdouble".
Did you mean:
opt_double
2014 May 02
1
Questions on extending Rcpp wrap and as with templates
Hi everyone,
I have been trying to extend Rcpp with my own wrap and as templates.
Two issues:
1) I need to explicitly call wrap. Is that expected?
So for example I wrote this specialization:
template<> SEXP Rcpp::wrap(std::vector<TimedOptDouble> const& entries) {
std::vector<double> sec_times;
std::vector<double> doubles;
for(auto const& entry : entries)
{
sec_times.push_back(entry.GetTime().Seconds());
TimedOptDouble::OptDouble opt_double(entry.GetOptDouble());
if(opt_double)
doubles.push_back(*opt_double);
else
do...