From 45c9834ca24f53e5264f4d169659445e676f5300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20=C3=9Acar?= Date: Thu, 3 Sep 2026 18:17:39 +0200 Subject: [PATCH 1/3] add -Wdeprecated-copy --- .github/workflows/werror.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/werror.yml b/.github/workflows/werror.yml index 205869085..21b4b6889 100644 --- a/.github/workflows/werror.yml +++ b/.github/workflows/werror.yml @@ -8,7 +8,7 @@ on: env: _R_CHECK_FORCE_SUGGESTS_: "false" - RCPP_CXXFLAGS: "-Werror -Wcast-function-type" + RCPP_CXXFLAGS: "-Werror -Wcast-function-type -Wdeprecated-copy" jobs: ci: From 8391a38d9d61996078bed030666f9186f95fd489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20=C3=9Acar?= Date: Thu, 3 Sep 2026 18:27:07 +0200 Subject: [PATCH 2/3] remove redundant copy operators --- inst/include/Rcpp/date_datetime/newDateVector.h | 8 -------- inst/include/Rcpp/date_datetime/newDatetimeVector.h | 9 --------- 2 files changed, 17 deletions(-) diff --git a/inst/include/Rcpp/date_datetime/newDateVector.h b/inst/include/Rcpp/date_datetime/newDateVector.h index 89e3138ea..34544c19e 100644 --- a/inst/include/Rcpp/date_datetime/newDateVector.h +++ b/inst/include/Rcpp/date_datetime/newDateVector.h @@ -48,14 +48,6 @@ namespace Rcpp { return v; } - inline newDateVector &operator=(const newDateVector &rhs) { - if (this != &rhs) { - NumericVector::operator=(rhs); - } - - return *this; - } - friend inline std::ostream &operator<<(std::ostream & s, const newDateVector d); private: diff --git a/inst/include/Rcpp/date_datetime/newDatetimeVector.h b/inst/include/Rcpp/date_datetime/newDatetimeVector.h index efbae149c..74ca3ff91 100644 --- a/inst/include/Rcpp/date_datetime/newDatetimeVector.h +++ b/inst/include/Rcpp/date_datetime/newDatetimeVector.h @@ -56,15 +56,6 @@ namespace Rcpp { return v; } - inline newDatetimeVector &operator=(const newDatetimeVector &rhs) { - if (this != &rhs) { - NumericVector::operator=(rhs); - this->attr("tzone") = rhs.attr("tzone"); - } - - return *this; - } - friend inline std::ostream &operator<<(std::ostream & s, const newDatetimeVector d); private: From e86ecb9d419c660ffd73f10871c651a6dbf0d989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20=C3=9Acar?= Date: Thu, 3 Sep 2026 18:27:23 +0200 Subject: [PATCH 3/3] update ChangeLog --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9d6337f50..184ee89f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,12 @@ * inst/tinytest/testRcppInterfaceExporter/src/RcppExports.cpp: Idem * inst/tinytest/testRcppInterfaceExporter/inst/include/testRcppInterfaceExporter_RcppExports.h: Idem + * .github/workflows/werror.yaml: Add -Wdeprecated-copy + + * inst/include/Rcpp/date_datetime/newDateVector.h: Remove redundant custom + copy operator to avoid -Wdeprecated-copy warnings + * inst/include/Rcpp/date_datetime/newDatetimeVector.h: Idem + 2026-09-01 IƱaki Ucar * .github/workflows/werror.yaml: Add new CI file with -Werror enabled