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

add missing <memory> header to allow building with GCC12 #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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 [email protected]

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 <[email protected]>
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