[Rcpp-devel] Overloaded constructors?

Dirk Eddelbuettel edd at debian.org
Fri Aug 5 18:54:07 CEST 2011


On 5 August 2011 at 12:06, Sebastian Weber wrote:
| Hi!
| 
| I recently learned how to deal with overlaoded functions when I wanna wrap
| a class function interface with overladed things. The solution is to use
| function pointers. 

Or 'factories' with a base class derived classes, and and and. I think there
are many ways.

| Now, what comes to the rescue in the case of overladed constructors? Any suggestion?

What exactly do you want?

I think the basic word is that at a basic level we just can't.  The R API is
after C-based and we have to play some tricks about generated names for
functions etc.  Romain put some tricks into Rcpp modules to allow something
close to multiple constructors for a Modules object but we can't give you
each and every feature of C++ in Rcpp as there are some restrictions imposed
by being in between R and C++ --- which is the space we chose to be in.

Cheers, Dirk

-- 
Gauss once played himself in a zero-sum game and won $50.
                      -- #11 at http://www.gaussfacts.com


More information about the Rcpp-devel mailing list