Skip to content

Commit 4c40ad4

Browse files
committed
Enhance Rcpp::Nullable::as with explicit cast (Closes #1470)
1 parent e27a256 commit 4c40ad4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
2026-04-09 Dirk Eddelbuettel <edd@debian.org>
22

33
* DESCRIPTION (Version, Date): Roll micro version and date
4+
2026-04-08 Dirk Eddelbuettel <edd@debian.org>
5+
6+
* inst/include/Rcpp/Nullable.h (as): Enhance by adding an explicit
7+
Rcpp::as<T>() aiding cases where implicit as<> does not suffice
48

59
2026-04-07 Dirk Eddelbuettel <edd@debian.org>
610

inst/include/Rcpp/Nullable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ namespace Rcpp {
126126
/**
127127
* Returns m_sexp as a T
128128
*/
129-
inline T as() { return get(); }
129+
inline T as() { return Rcpp::as<T>(get()); }
130130

131131
/**
132132
* Return a clone of m_sexp as a T

0 commit comments

Comments
 (0)