Skip to content
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

[BUILD] Clang-Cl fails to build due to RootNode.h ValueT aliasing #1785

Open
bgottamd opened this issue Apr 4, 2024 · 0 comments
Open

[BUILD] Clang-Cl fails to build due to RootNode.h ValueT aliasing #1785

bgottamd opened this issue Apr 4, 2024 · 0 comments

Comments

@bgottamd
Copy link

bgottamd commented Apr 4, 2024

Environment

Operating System: Windows 11
Version / Commit SHA: 45d2ce4
CMake Version: 3.28
Compiler: clang-cl

Describe the problem

When compiling with clang-cl the inner ValueT in the convertValue function reports an use of undeclared identifier ValueT error in RootNode.h

To Reproduce

The below example fails compile due to this issue. Boost may cause issues when compiling with clang but that can be fixed using this boost pull req.

#include <openvdb/openvdb.h>
#include <openvdb/tree/RootNode.h>
#include <openvdb/tree/InternalNode.h>
#include <iostream>

int main()
{
    openvdb::initialize();
    using FloatRootNodeType = openvdb::tree::RootNode<openvdb::tree::InternalNode<openvdb::tree::InternalNode<openvdb::tree::LeafNode<float, 3>, 4>, 5>>;
    FloatRootNodeType floatRoot;
    using IntRootNodeType = openvdb::tree::RootNode<openvdb::tree::InternalNode<openvdb::tree::InternalNode<openvdb::tree::LeafNode<int, 3>, 4>, 5>>;
    IntRootNodeType intRoot;
    openvdb::Coord xyz(0, 0, 0);
    intRoot = floatRoot;
    return 0;
}
bgottamd added a commit to bgottamd/openvdb that referenced this issue Apr 4, 2024
bgottamd added a commit to bgottamd/openvdb that referenced this issue Apr 4, 2024
…ang-cl. Resolves AcademySoftwareFoundation#1785

Signed-off-by: Benjamin Gottheil <Benjamin.Gottheil@amd.com>
bgottamd added a commit to bgottamd/openvdb that referenced this issue Apr 4, 2024
…ang-cl. Resolves AcademySoftwareFoundation#1785

Signed-off-by: bgottamd <Benjamin.Gottheil@amd.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

No branches or pull requests

1 participant