Skip to content

Remove Vector( std::vector<T> && ) constructor - #7211

Open
Fedr wants to merge 4 commits into
masterfrom
vector-no-stdvector-ctor
Open

Fedr wants to merge 4 commits into
masterfrom
vector-no-stdvector-ctor

Conversation

@Fedr

@Fedr Fedr commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Removes the implicit Vector( std::vector<T> && ) constructor (bound as the stdVector overload).

  • Mesh generators (cylinder, sphere, torus, solid of revolution), mesh loading and computePer{Face,Vert}{Pseudo}Normals built a std::vector and converted it on return; they now build VertCoords / FaceNormals / VertNormals directly, indexing with VertId.
  • Where the input really is a std::vector (the delaunayTriangulationXY( std::vector<Vector3f> ) overload, 3mf palettes, offset volume parts, numpy import), it is moved into vec.
  • Tests brace-initialize VertCoords instead of std::vector<Vector3f>.

Breaking: C++ code passing/returning a std::vector where a Vector is expected no longer compiles; the bindings lose the constructor from std::vector. In Python this also removes building a Vector from a list, e.g. Vector_MeshOrPointsXf_ObjId([...]); the GlobalRegistration example now fills the Vector with push_back instead.

Checked locally with a cl /Zs sweep of all 700 MeshLib C++ TUs on Windows; Linux/macOS/Emscripten-only code is left to CI.

🤖 Generated with Claude Code

Fedr and others added 4 commits October 20, 2026 22:43
Code that built a std::vector only to convert it now builds the Vector type
directly (VertCoords, FaceNormals, VertNormals) with typed-id indexing.
Where the input really is a std::vector (delaunayTriangulationXY overload,
3mf palettes, offset volume parts, numpy), it is moved into the vec field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…irectly

The list-to-Vector conversion went through the removed constructor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant