8000 BSD compiler error · Issue #840 · elalish/manifold · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

BSD compiler error #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
< 8000 /div>
starseeker opened this issue Jun 12, 2024 · 1 comment · Fixed by #841
Closed

BSD compiler error #840

starseeker opened this issue Jun 12, 2024 · 1 comment · Fixed by #841

Comments

@starseeker
Copy link
Contributor

Tried building with clang 16 on GhostBSD, and saw the following:

FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0

/home/user/manifold/src/manifold/src/csg_tree.cpp:320:21: error: loop variable 'pair' creates a copy from type 'const value_type' (aka 'const pair<const int, manifold::Manifold::Impl::Relation>') [-Werror,-Wrange-loop-construct]
    for (const auto pair : node->pImpl_->meshRelation_.meshIDtransform) {
                    ^
/home/user/manifold/src/manifold/src/csg_tree.cpp:320:10: note: use reference type 'const value_type &' (aka 'const pair<const int, manifold::Manifold::Impl::Relation> &') to prevent copying
    for (const auto pair : node->pImpl_->meshRelation_.meshIDtransform) {
         ^~~~~~~~~~~~~~~~~
                    &
1 error generated.
@elalish
Copy link
Owner
elalish commented Jun 13, 2024

Huh, kind of figured a compiler would optimize that anyway, but okay. Do you want to make a PR?

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 a pull request may close this issue.

2 participants
0