Skip to content
Snippets Groups Projects

Resolving Ambiguous Constructor Call in Legacy Vector Initialization

Merged Qiaozhi Lei requested to merge ambiguous-legacy-vector-constructor into master

Description:

When the OPENMESH_VECTOR_LEGACY option is enabled, a compile error is encountered:

error C2668: 'OpenMesh::VectorT<double,3>::VectorT': ambiguous call to overloaded function

The ambiguity arises when initializing with a single scalar, as in Normal n(0). This matches two potential constructors:

  1. OpenMesh::VectorT<double,3>::VectorT(const Scalar [])
  2. OpenMesh::VectorT<double,3>::VectorT(const Scalar &)

To avoid this ambiguity, this PR initializes using three scalars, e.g., Normal n(0,0,0). This approach is also adopted in the calculation of halfedge normals.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading