title: Two vector equal in RcppArmadillo?
body: <p>In my function, I want to compare the rows in a matrix by use ==,but it doesn't work.</p>
  
  <pre><code>#include &lt;RcppArmadillo.h&gt;
  // [[Rcpp::depends(RcppArmadillo)]]
  using namespace Rcpp;
  // [[Rcpp::export]]
  double accept(arma::mat x){
    int b=x.n_rows;
    arma::vec B(b-1);B.zeros();
    for(int i=0;i&lt;b-1;i++){
      arma::rowvec a1;arma::rowvec a2;
      if(x.row(i)==x.row(i+1)){
        B[i]=0;
      }else{
        B[i]=1;
      }
    }
    double bb;bb=sum(B)/(b-1);
    return(bb);
  }
  </code></pre>
  
  <p>Error message:</p>
  
  <blockquote>
    <p>c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/Users/songxl/DOCUME~1/R/R-35~1.0RC/include" -DNDEBUG -I../inst/include -fopenmp  -I"C:/Users/songxl/Documents/R/R-3.5.0rc/library/Rcpp/include" -I"C:/Users/songxl/Documents/R/R-3.5.0rc/library/RcppArmadillo/include" -I"E:/adptive/block"        -O2 -Wall  -mtune=generic -c acp.cpp -o acp.o
    acp.cpp: In function 'double accept(arma::mat)':
    acp.cpp:10:16: error: could not convert 'arma::operator==(const T1&amp;, const T2&amp;) [with T1 = arma::subview_row; T2 = arma::subview_row; typename arma::enable_if2&lt;(arma::is_arma_type::value &amp;&amp; arma::is_arma_type::value), const arma::mtGlue >::result = const arma::mtGlue, arma::subview_row, arma::glue_rel_eq>]((<em>(const arma::subview_row</em>)(&amp; arma::Mat::row(arma::uword) [with eT = double; arma::uword = unsigned int](((arma::uword)(i + 1))))))' from 'arma::enable_if2, arma::subview_row, arma::glue_rel_eq> >::result {aka const arma::mtGlue, arma::subview_row, arma::glue_rel_eq>}' to 'bool'
         if(x.row(i)==x.row(i+1)){
                    ^
    make: *** [acp.o] Error 1</p>
  </blockquote>