Skip to content

New issue on get__() versus get() #1483

Description

@eddelbuettel

This came up in the reverse depends check for #1482, but reproduces locally for me. Package RestRserve has a .hasAttribute() check, and that fails on

ccache g++ -I"/usr/share/R/include" -DNDEBUG  -I'/usr/local/lib/R/site-library/Rcpp/include'    -DRCPP_NO_MODULES -fpic  -g0 -O3 -Wall -pipe -Wno-unused  -fext-numeric-literals -DBOOST_NO_AUTO_PTR    -c format_\
headers.cpp -o format_headers.o
In file included from /usr/local/lib/R/site-library/Rcpp/include/Rcpp/proxy/proxy.h:24,
                 from /usr/local/lib/R/site-library/Rcpp/include/RcppCommon.h:132,
                 from /usr/local/lib/R/site-library/Rcpp/include/Rcpp.h:27,
                 from format_headers.cpp:3:
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/proxy/AttributeProxy.h: In instantiation of ‘bool Rcpp::AttributeProxyPolicy<CLASS>::hasAttribute(const std::string&) const [with CLASS = Rcpp::ListOf<Rcpp::Vecto\
r<16> >; std::string = std::__cxx11::basic_string<char>]’:
format_headers.cpp:12:22:   required from here
   12 |   if (!x.hasAttribute("names")) {
      |        ~~~~~~~~~~~~~~^~~~~~~~~
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/proxy/AttributeProxy.h:100:61: error: ‘const class Rcpp::ListOf<Rcpp::Vector<16> >’ has no member named ‘get__’; did you mean ‘get’?
  100 |         return R_hasAttrib(static_cast<const CLASS&>(*this).get__(), Rf_install(attr.c_str()));
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
      |                            get
make: *** [/usr/lib/R/etc/Makeconf:199: format_headers.o] Error 1
ERROR: compilation failed for package ‘RestRserve’

It does indeed go away if we replace get__() with get() here:

return R_hasAttrib(static_cast<const CLASS&>(*this).get__(), Rf_install(attr.c_str()));

but as even that file has another get__() I am wondering if we need a more general chase for it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions