Rcpp warning: Call to 'exp' is ambiguous
问题 I am writing a Rcpp code as below: // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::depends(BH)]] // [[Rcpp::plugins(cpp11)]] #include <RcppArmadillo.h> #include <boost/random.hpp> #include <boost/random/uniform_real_distribution.hpp> #include <math.h> using namespace Rcpp; using namespace std; // [[Rcpp::export]] double ks(const double k, const double alpha, const double mag, const double M0){ double ksres; ksres= k* std::exp ( alpha*(mag-M0) ); return(ksres); } . But it shows that "Call to