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: 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 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: