[Rcpp-devel] constructors taking the same number of arguments

Greg Minshall minshall at umich.edu
Fri Mar 8 06:21:51 CET 2013


hi.  the Rcpp-modules document, section 2.2.2, mentions that one can
write a routine to disambiguate between different constructors taking
the same number of arguments.

i wonder, in the case one has *not* provided such a disambiguator, would
it be possible to offer up an error message, maybe at compile time?
(and point the programmer at the relevant document.)

attached is a test case which compiles, but gets a runtime error   it
took me a bit of head scratching, compiling Rcpp with debug symbols so i
could follow the action, etc.

(in *this* case, the specific error message is: "Error: not an S4
object".)

cheers, Greg
----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test5.cc
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130307/a3af11c7/attachment.ksh>


More information about the Rcpp-devel mailing list