as suggested by Christian Authmann on Rcpp-devel