MIT-SPARK / TEASER-plusplus

A fast and robust point cloud registration library
MIT License
1.81k stars 344 forks source link

CMAKE_CXX_STANDARD is set to 14 but [[nodiscard]] is a C++17 feature #140

Open patsp opened 2 years ago

patsp commented 2 years ago

Hi, I noticed a minor inconsistency in the build.

In the CMakeLists.txt, CMAKE_CXX_STANDARD is set to 14:

https://github.com/MIT-SPARK/TEASER-plusplus/blob/111e2ce81aa8c25fad66fcd1feecb758e1c76281/CMakeLists.txt#L4

But in graph.h, [[nodiscard]], which is a C++17 feature (https://en.cppreference.com/w/cpp/language/attributes/nodiscard), is used for example here:

https://github.com/MIT-SPARK/TEASER-plusplus/blob/111e2ce81aa8c25fad66fcd1feecb758e1c76281/teaser/include/teaser/graph.h#L131

jingnanshi commented 2 years ago

Thanks for reporting this. I will likely remove [[nodiscard]] from the code.