const correctness needed for Rcpp impl that is more careful about such things, e.g Rcpp1*