diff --git a/inst/include/Rcpp/Dimension.h b/inst/include/Rcpp/Dimension.h index ce8fa4b36..451a9dfc1 100644 --- a/inst/include/Rcpp/Dimension.h +++ b/inst/include/Rcpp/Dimension.h @@ -56,7 +56,7 @@ namespace Rcpp{ inline int size() const { return (int) dims.size() ; } - inline int prod() const { + inline R_xlen_t prod() const { return std::accumulate( dims.begin(), dims.end(), static_cast(1), std::multiplies() ); }