Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making string_proxy::operator==( string_proxy ) const to disambiguate #855

Merged
merged 2 commits into from
May 27, 2018

Conversation

romainfrancois
Copy link
Contributor

@romainfrancois romainfrancois commented May 27, 2018

Fixes #854

#include <algorithm>
#include <Rcpp.h>
using namespace Rcpp ;

// [[Rcpp::export]]
bool test(CharacterVector x, CharacterVector y) {
    if (x.length() != y.length()) {
        return false;
    }

    return std::equal(x.begin(), x.end(), y.begin());
}


/*** R
test("foo", "bar")
*/

gives :

romain@purrplex ~/git/RcppCore $ Rscript -e 'Rcpp::sourceCpp("~/Desktop/test.cpp")'

> test("foo", "bar")
[1] FALSE

@eddelbuettel
Copy link
Member

Thumbs up, all good.

@eddelbuettel eddelbuettel merged commit 032d307 into RcppCore:master May 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants