Skip to content

Commit 3ad32e8

Browse files
authored
Avoid -Wdeprecated-copy warnings (#1503)
* add -Wdeprecated-copy * remove redundant copy operators * update ChangeLog
1 parent df33639 commit 3ad32e8

4 files changed

Lines changed: 7 additions & 18 deletions

File tree

.github/workflows/werror.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
_R_CHECK_FORCE_SUGGESTS_: "false"
11-
RCPP_CXXFLAGS: "-Werror -Wcast-function-type"
11+
RCPP_CXXFLAGS: "-Werror -Wcast-function-type -Wdeprecated-copy"
1212

1313
jobs:
1414
ci:

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
* inst/tinytest/testRcppInterfaceExporter/src/RcppExports.cpp: Idem
1313
* inst/tinytest/testRcppInterfaceExporter/inst/include/testRcppInterfaceExporter_RcppExports.h: Idem
1414

15+
* .github/workflows/werror.yaml: Add -Wdeprecated-copy
16+
17+
* inst/include/Rcpp/date_datetime/newDateVector.h: Remove redundant custom
18+
copy operator to avoid -Wdeprecated-copy warnings
19+
* inst/include/Rcpp/date_datetime/newDatetimeVector.h: Idem
20+
1521
2026-09-01 Iñaki Ucar <iucar@fedoraproject.org>
1622

1723
* .github/workflows/werror.yaml: Add new CI file with -Werror enabled

inst/include/Rcpp/date_datetime/newDateVector.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ namespace Rcpp {
4848
return v;
4949
}
5050

51-
inline newDateVector &operator=(const newDateVector &rhs) {
52-
if (this != &rhs) {
53-
NumericVector::operator=(rhs);
54-
}
55-
56-
return *this;
57-
}
58-
5951
friend inline std::ostream &operator<<(std::ostream & s, const newDateVector d);
6052

6153
private:

inst/include/Rcpp/date_datetime/newDatetimeVector.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,6 @@ namespace Rcpp {
5656
return v;
5757
}
5858

59-
inline newDatetimeVector &operator=(const newDatetimeVector &rhs) {
60-
if (this != &rhs) {
61-
NumericVector::operator=(rhs);
62-
this->attr("tzone") = rhs.attr("tzone");
63-
}
64-
65-
return *this;
66-
}
67-
6859
friend inline std::ostream &operator<<(std::ostream & s, const newDatetimeVector d);
6960

7061
private:

0 commit comments

Comments
 (0)