Compiler warnings: Deprecated implicit copy constructor / implicit copy asignment operator
With clang10 and -Wdeprecated-copy I get a lot of warnings like
dune-geometry/dune/geometry/axisalignedcubegeometry.hh:135:30: warning: definition of implicit copy constructor for 'AxisAlignedCubeGeometry<double, 1, 2>' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]
AxisAlignedCubeGeometry& operator=(const AxisAlignedCubeGeometry& other)
In the concrete case above, it indeed seems like the copy assignment operator
/** \brief Assignment operator */
AxisAlignedCubeGeometry& operator=(const AxisAlignedCubeGeometry& other)
{
lower_ = other.lower_;
upper_ = other.upper_;
axes_ = other.axes_;
return *this;
}
is not necessary. I guess the rule of five doesn't apply here since there is no user defined destructor or move constructor. Could we remove it?