Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • OpenVolumeMesh OpenVolumeMesh
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 26
    • Issues 26
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenVolumeMeshOpenVolumeMesh
  • OpenVolumeMeshOpenVolumeMesh
  • Issues
  • #9
Closed
Open
Issue created Feb 11, 2019 by Martin Heistermann@mheistermannMaintainer

Properties are not typesafe

When you accidentally index a property with a Handle of the wrong kind, this gives no error indication at compile time. I think VertexProperty[EdgeHandle] etc. should not compile.

PropertyPtr::operator[] currently has overloads for OpenVolumeMeshHandle and size_t arguments, IMO there should be only one function that takes the correct specific handle type. The size_t overload is dangerous in combination with the Handle's implicit int() conversion, as it would still allow this kind of type unsafety, I think we should at least not keep both, if not even remove both.

This would be a backwards-incompatible change - maybe best to handle with depreciation macros?

Edited Feb 11, 2019 by Martin Heistermann
Assignee
Assign to
Time tracking