File tree Expand file tree Collapse file tree 4 files changed +24
-6
lines changed
include/Rcpp/date_datetime Expand file tree Collapse file tree 4 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 66 of RNGScope
77 * inst/include/Rcpp/vector/Matrix.h: Protected Matrix op Scalar
88 definitions with #ifndef RCPP_NO_SUGAR
9+ 2016-11-10 Dirk Eddelbuettel <edd@debian.org>
10+
11+ * inst/include/Rcpp/date_datetime/newDateVector.h: Added constructor
12+ using VectorBase<>
13+
14+ 2016-01-05 Daniel C. Dillon <dcdillon@gmail.com>
15+
16+ * inst/include/Rcpp/date_datetime/newDatetimeVector.h: Added constructor
17+ to instantiate newDatetimeVector from VectorBase.
918
10192016-11-04 Nathan Russell <russell.nr2012@gmail.com>
1120
12- * inst/include/Rcpp/macros/dispatch.h: Modify variadic macros
21+ * inst/include/Rcpp/macros/dispatch.h: Modify variadic macros
1322 to not use GNU extensions
1423 * DESCRIPTION: roll minor version
1524
16252016-11-03 Nathan Russell <russell.nr2012@gmail.com>
1726
18- * inst/include/Rcpp/hash/IndexHash.h: Add casts to eliminate
27+ * inst/include/Rcpp/hash/IndexHash.h: Add casts to eliminate
1928 signed / unsigned comparison warning
2029 * inst/include/Rcpp/hash/SelfHash.h: Idem
21- * inst/unitTests/cpp/sugar.cpp: Added unit tests for sugar function
30+ * inst/unitTests/cpp/sugar.cpp: Added unit tests for sugar function
2231 unique()
2332 * inst/unitTests/runit.sugar.R: Idem
2433
Original file line number Diff line number Diff line change 3333 \itemize {
3434 \item The \code {DateVector } and \code {DatetimeVector } classes were renamed
3535 with a prefix \code {old }; they are currently \code {typedef }' ed to the
36- existing name (\g hpr{557})
36+ existing name (\g hpr{557}, also \g hpr{577} )
3737 \i tem New variants \c ode{newDateVector} and \c ode{newDatetimeVector} were
38- added based on \c ode{NumericVector} (also ( \g hpr{557})
38+ added based on \c ode{NumericVector} (also \g hpr{557}, \g hpr{577 })
3939 \i tem By defining \c ode{RCPP_NEW_DATE_DATETIME_VECTORS} the new classes
4040 can activated. We intend to make the new classes the default no sooner
4141 than twelve months from this release.
42- \i tem The \c ode{capabilities()} function can also be tested for this feature
42+ \i tem The \c ode{capabilities()} function can also be used for presence of
43+ this feature
4344 }
4445 }
4546}
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ namespace Rcpp {
2828
2929 class newDateVector : public NumericVector {
3030 public:
31+ template <int RTYPE, bool NA, typename VEC>
32+ newDateVector (const VectorBase<RTYPE,NA,VEC>& vec) : NumericVector(vec) {}
33+
3134 newDateVector (SEXP vec) : NumericVector(vec) { setClass (); }
3235 newDateVector (int n) : NumericVector(n) { setClass (); }
3336
Original file line number Diff line number Diff 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);
You can’t perform that action at this time.
0 commit comments