Skip to content

Commit 2aeb676

Browse files
authored
Merge pull request #577 from dcdillon/feature/datetime-issues
Added constructor to instantiate newDatetimeVector from VectorBase.
2 parents 88ebc36 + 545c5ef commit 2aeb676

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

inst/include/Rcpp/date_datetime/newDatetimeVector.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,15 @@ namespace Rcpp {
2828

2929
class newDatetimeVector : public NumericVector {
3030
public:
31+
template <int RTYPE, bool NA, typename VEC>
32+
newDatetimeVector( const VectorBase<RTYPE,NA,VEC>& other ) :
33+
NumericVector(other) {}
34+
3135
newDatetimeVector(SEXP vec, const char* tz = "") :
3236
NumericVector(vec) {
3337
setClass(tz);
3438
}
39+
3540
newDatetimeVector(int n, const char* tz = "") :
3641
NumericVector(n) {
3742
setClass(tz);

0 commit comments

Comments
 (0)