This code seems simple enough (from cxxPack)...<br><br>RcppExport SEXP testBankOpen(SEXP name, SEXP id, SEXP balance) {<br> BEGIN_RCPP<br> BankAccount *p = new BankAccount(Rcpp::as<std::string>(name),<br> Rcpp::as<int>(id),<br>
Rcpp::as<double>(balance));<br> Rcpp::XPtr<BankAccount> xp(p, true);<br> return xp;<br> END_RCPP<br>}<br><br>Yet I get this from the Sun/Solaris compiler;<br><br>"/home/ripley/R/Lib32/Rcpp/include/Rcpp/XPtr.h", line 46: Warning:
m_sexp hides Rcpp::RObject::m_sexp.<br>
"testBankAccount.cpp", line 35: Where: While instantiating
"Rcpp::XPtr<BankAccount>::XPtr(SEXPREC*, SEXPREC*, SEXPREC*)".<br>
"testBankAccount.cpp", line 35: Where: Instantiated from
non-template code.<br>
"/home/ripley/R/Lib32/Rcpp/include/Rcpp/XPtr.h", line 180: Warning
(Anachronism): Formal argument fun of type extern "C" void(*)(SEXPREC*)
in call to R_RegisterCFinalizerEx(SEXPREC*, extern "C"
void(*)(SEXPREC*), Rboolean) is being passed void(*)(SEXPREC*).<br>
"/home/ripley/R/Lib32/Rcpp/include/Rcpp/XPtr.h", line 174: Where:
While instantiating
"Rcpp::XPtr<BankAccount>::setDeleteFinalizer()".<br>
"/home/ripley/R/Lib32/Rcpp/include/Rcpp/XPtr.h", line 174: Where:
Instantiated from Rcpp::XPtr<BankAccount>::XPtr(BankAccount*,
bool, SEXPREC*, SEXPREC*).<br>
"testBankAccount.cpp", line 25: Where: Instantiated from
non-template code.<br><br>The same compiler warns when I wrap a std::vector<double>:<br><br>"/home/ripley/R/Lib32/Rcpp/include/Rcpp/traits/is_convertible.h", line
40: Warning: A non-POD object of type "std::vector<double>" passed
as a variable argument to function "static
Rcpp::traits::is_convertible<std::vector<double>,
SEXPREC*>::Test(...)".<br>
"/home/ripley/R/Lib32/Rcpp/include/Rcpp/internal/wrap.h", line 510:
Where: While specializing
"Rcpp::traits::is_convertible<std::vector<double>,
SEXPREC*>".<br>
"/home/ripley/R/Lib32/Rcpp/include/Rcpp/internal/wrap.h", line 510:
Where: Instantiated from
Rcpp::internal::wrap_dispatch_unknown_importable<std::vector<double>>(const
std::vector<double>&,
Rcpp::traits::integral_constant<bool, 0>).<br>
"/home/ripley/R/Lib32/Rcpp/include/Rcpp/internal/wrap.h", line 527:
Where: Instantiated from
Rcpp::internal::wrap_dispatch<std::vector<double>>(const
std::vector<double>&, Rcpp::traits::wrap_type_unknown_tag).<br>
"/home/ripley/R/Lib32/Rcpp/include/Rcpp/internal/wrap.h", line 624:
Where: Instantiated from
Rcpp::wrap<std::vector<double>>(const
std::vector<double>&).<br>
"testFFT.cpp", line 29: Where: Instantiated from non-template code.<br><br>Odd thing about the last message is that there are two lines that do exactly the same thing (wrap a std::vector<double>) but<br>
the compiler issues a warning about only one of them.<br><br>Ideas?<br><br>Thanks,<br>Dominick<br><br>