title: min and max in Rcpp programs
body: <p>I was converting an R  function into Rcpp function. It is all fine but I have difficulties in using the standard max and min function. The code below:</p>
  
  <pre><code>#include &lt;math.h&gt;
  #include &lt;RcppArmadillo.h&gt;
  #include &lt;algorithm&gt;
  #include &lt;iostream&gt;
  
  // [[Rcpp::depends(RcppArmadillo)]]
  
  using namespace Rcpp;
  using namespace arma;
  using namespace std;
  
  double f4RandomC(double x, double a, double b) {
    double out, temp;
  
    temp=(log( (a*(1-x)) / (a+x) )) /log(b) ;
    out= std::min(1,temp );
    return out;
  }
  </code></pre>
  
  <p>returns me error "no matchinf function for call min(int, &amp;double). If possible, I would lioke to use the std:: library min function</p>