Skip to content
Prev 10266 / 10988 Next

[Rcpp-devel] Debugging Rcpp for Solaris

Many of the Solaris quirks are documented in R-exts:

https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Portable-C-and-C_002b_002b-code

In particular:

Mathematical functions such as sqrt are defined in C++ for
floating-point arguments. It is legitimate in C++ to overload these
with versions for types float, double, long double and possibly more.
This means that calling sqrt on an integer type may have ?overloading
ambiguity? as it could be promoted to any of the supported
floating-point types: this is commonly seen on Solaris, but for pow
also seen on macOS. (C++98 has an overload for std::pow(<double>,
<int>), but this may not be visible from the main namespace. C++11
requires additional overloads for integer types, and ambiguous
overloads are more common in C++11 (and later) compiler modes.)

You seem to be bumping into some form of this.

That said, it seems unlikely that you intended to take the log of a bool...

Best,
Kevin
On Wed, Jan 9, 2019 at 6:04 AM mike guggis <mikeguggis at gmail.com> wrote: