Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork219
Closed
Description
This pattern recently started to cause CRAN failures in purrrlyr on the fedora/clang machine. I can reproduce it with clang on my macOS machine:
#include<algorithm>#include<Rcpp.h>// [[Rcpp::export]]booltest(Rcpp::CharacterVector x, Rcpp::CharacterVector y) {if (x.length() != y.length()) {return0; }returnstd::equal(x.begin(), x.end(), y.begin());}/*** R test("foo", "bar")*/
In file included from clangCharacterVector.cpp:1:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:682:71: error: use of overloaded operator '==' is ambiguous (with operand types 'const Rcpp::internal::string_proxy<16, PreserveStorage>' and 'const Rcpp::internal::string_proxy<16, PreserveStorage>') bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;} ~~~ ^ ~~~/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:1325:14: note: in instantiation of member function 'std::__1::__equal_to<Rcpp::internal::string_proxy<16, PreserveStorage>, Rcpp::internal::string_proxy<16, PreserveStorage> >::operator()' requested here if (!__pred(*__first1, *__first2)) ^/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:1337:19: note: in instantiation of function template specialization 'std::__1::equal<Rcpp::internal::Proxy_Iterator<Rcpp::internal::string_proxy<16, PreserveStorage> >, Rcpp::internal::Proxy_Iterator<Rcpp::internal::string_proxy<16, PreserveStorage> >, std::__1::__equal_to<Rcpp::internal::string_proxy<16, PreserveStorage>, Rcpp::internal::string_proxy<16, PreserveStorage> > >' requested here return _VSTD::equal(__first1, __last1, __first2, __equal_to<__v1, __v2>()); ^clangCharacterVector.cpp:10:15: note: in instantiation of function template specialization 'std::__1::equal<Rcpp::internal::Proxy_Iterator<Rcpp::internal::string_proxy<16, PreserveStorage> >, Rcpp::internal::Proxy_Iterator<Rcpp::internal::string_proxy<16, PreserveStorage> > >' requested here return std::equal(x.begin(), x.end(), y.begin()); ^/Users/lionel/R/library/3.5/Rcpp/include/Rcpp/vector/string_proxy.h:204:22: note: candidate function bool operator==( SEXP other ) const { ^/Users/lionel/R/library/3.5/Rcpp/include/Rcpp/String.h:525:17: note: candidate function inline bool operator==(const String::StringProxy& lhs, const String& rhs) { ^/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:682:71: note: built-in candidate operator==(struct SEXPREC *, struct SEXPREC *) bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;} ^/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:682:71: note: built-in candidate operator==(const struct SEXPREC *, const struct SEXPREC *)/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:682:71: note: built-in candidate operator==(char *, char *)/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:682:71: note: built-in candidate operator==(const char *, const char *)1 error generated.make: *** [clangCharacterVector.o] Error 1ccache clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Users/lionel/R/library/3.5/Rcpp/include" -I"/Users/lionel/Dropbox/Projects/R/mock/clangCharacterVector/.metadata" -I"/Users/lionel/Dropbox/Projects/R/mock/clangCharacterVector/.metadata/../inst/include" -I/usr/local/include -fPIC -arch x86_64 -ftemplate-depth-256 -Wall -pedantic -O0 -g -c clangCharacterVector.cpp -o clangCharacterVector.oError in Rcpp::sourceCpp("~/Dropbox/Projects/R/mock/clangCharacterVector/.metadata/clangCharacterVector.cpp") : Error 1 occurred building shared library.Metadata
Metadata
Assignees
Labels
No labels