TEASER-plusplus icon indicating copy to clipboard operation
TEASER-plusplus copied to clipboard

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

Open patsp opened this issue 2 years ago • 1 comments

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

patsp avatar Aug 09 '22 06:08 patsp

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

jingnanshi avatar Aug 19 '22 14:08 jingnanshi