点云库八叉树库生成错误

Point Cloud Library Octree lib generating error

我只是将头文件包含到我的代码中才收到此错误。 我正在使用 visual studio 2019 和 c++17,我已经包含了链接器文件和所有但它不想工作。

会是什么?

Error C4996 'std::iterator<std::forward_iterator_tag,const pcl::octree::OctreeNode,void,const pcl::octree::OctreeNode *,const pcl::octree::OctreeNode &>': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The header is NOT deprecated.) The C++ Standard has never required user-defined iterators to derive from std::iterator. To fix this warning, stop deriving from std::iterator and start providing publicly accessible typedefs named iterator_category, value_type, difference_type, pointer, and reference. Note that value_type is required to be non-const, even for constant iterators. You can define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning. TCC2 D:\dev\CMake\vcpkg\installed\x64-windows\include\pcl\octree\octree_iterator.h 71

这是使用已弃用代码的警告,Visual Studio默认将其视为错误。

转到项目属性 -> 配置属性 -> C/C++ -> 常规 -> SDL 检查 -> 设置为否。它应该是好的。