Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullable additions #421

Closed
dcdillon opened this issue Jan 17, 2016 · 1 comment
Closed

Nullable additions #421

dcdillon opened this issue Jan 17, 2016 · 1 comment

Comments

@dcdillon
Copy link
Contributor

I would like to add two convenience member functions to Rcpp::Nullable<T> specifically:

T Nullable::as()
{
    return T(m_sexp);
}

T Nullable::clone() const
{
    return T(Rcpp:::clone(m_sexp));
}

These are analogous to the Rcpp::as and Rcpp::clone functions and just add convenience to the Nullable class.

Any objections?

@eddelbuettel
Copy link
Member

That sounds pretty good, is un-objectionable as it also only 'grows' the interface not altering anything existing and completes the interface. PR away, if your fingers aren't frozen yet :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants