Skip to content

Conversation

blurgyy
Copy link

@blurgyy blurgyy commented Dec 20, 2022

Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library since GCC121. As a result, building torch-points-kernels with GCC12 fails with message:

  cpu/src/neighbors.cpp:317:10: error: ‘unique_ptr’ is not a member of ‘std’
    317 |     std::unique_ptr<my_kd_tree_t> index(new my_kd_tree_t(3, pcd, tree_params));
        |          ^~~~~~~~~~
  cpu/src/neighbors.cpp:317:10: note: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?

This pr adds the missing <memory> header to cpu/src/neighbors.cpp to allow building with GCC12.

Signed-off-by: Gaoyang Zhang gy@blurgy.xyz

Footnotes

  1. https://gcc.gnu.org/gcc-12/porting_to.html#header-dep-changes

Some C++ Standard Library headers have been changed to no longer include
other headers that were being used internally by the library since
GCC12[^1].  As a result, building torch-points-kernels with GCC12 fails
with message:

      cpu/src/neighbors.cpp:317:10: error: ‘unique_ptr’ is not a member of ‘std’
        317 |     std::unique_ptr<my_kd_tree_t> index(new my_kd_tree_t(3, pcd, tree_params));
            |          ^~~~~~~~~~
      cpu/src/neighbors.cpp:317:10: note: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?

This pr adds the missing `<memory>` header to `cpu/src/neighbors.cpp` to
allow building with GCC12.

[^1]: <https://gcc.gnu.org/gcc-12/porting_to.html#header-dep-changes>

Signed-off-by: Gaoyang Zhang <gy@blurgy.xyz>
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