Why is Geometry not copy-assignable?
The Geometry
class has a deleted copy-assignment operator. Why is this operator deleted? I tried to follow the git history but it end in a commit from 9y ago: 432cba1b that was imported from SVN. As far as I can tell, all real implementations from dune-geometry are copy-assignable.
Making a class not copy-assignable results in complicated code when we want to store a geometry in a class, e.g. in the implementation of grid-functions in dune-functions. There, we need to use a std::optional
or pointer types to construct a new copy (copy construction seems to be still allowed). This has further consequences: The std::optional<Geometry>
then is also not copyable.
I just want to understand the reasoning behind the deleted copy operator. Maybe it cannot be implemented efficiently (for some reason) in a specific grid manager?