Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D dune-grid
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 43
    • Issues 43
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Core ModulesCore Modules
  • dune-grid
  • Issues
  • #140
Closed
Open
Issue created Dec 10, 2021 by Simon Praetorius@simon.praetoriusOwner

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?

Assignee
Assign to
Time tracking