Replace Boost filesystem with C++17 std::filesystem#6405
Replace Boost filesystem with C++17 std::filesystem#6405kai-waang wants to merge 4 commits intoPointCloudLibrary:masterfrom
Conversation
…d cleanup cmake C++17 related checks
|
First of all, thank you for your pull request. I think there are a few decisions we should discuss (@larshg I would also like to hear your opinion on these, when you have time)
|
|
I agree with both points 👍 At least we should change the public api's in Out of core - perhaps if it is possible to avoid using any classes from boost/std filesystem, but rely on std::strings etc? |
|
As for point 1, I would still suggest removing PCL_PREFER_BOOST_FILESYSTEM, since the CI already tests all major platforms (Ubuntu 20.04+ with GCC 9+, Clang 11+, macOS 14+, Windows VS2019+), where As for point 2, providing deprecated overloads may not be the best option either. |
#6403 has dropped support for C++14, so
std::filesystemis now avaliable by default in PCL. As discussed in #5881,boost::filesystemwas kept because of C++14 compatibility. So this PR:Boost::filesystemfrompcl_find_boost.cmakePCL_PREFER_BOOST_FILESYSTEM.Boost::filesystemoutofcoretopcl_fsand nowpcl_fsis equal tostd::filesystemSome codes still have boost/filesystem or boost::filesystem usage.
pcl/outofcore/boost.h,pcl/visualization/boost.h: includes<boost/filesystem.hpp>. But these two header files are not used in PCL.pcl/outofcore/impl/octree_base_node.hpp 2021:2172, but these codes are wrapped by#if 0, and may be removed by another PR.