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

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

Open
patsp opened this issue Aug 9, 2022 · 1 comment
Open

Comments

@patsp
Copy link

patsp commented Aug 9, 2022

Hi, I noticed a minor inconsistency in the build.

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

set(CMAKE_CXX_STANDARD 14)

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:

[[nodiscard]] int numVertices() const { return adj_list_.size(); }

@jingnanshi
Copy link
Member

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

jingnanshi pushed a commit that referenced this issue May 5, 2024
* Set const in the inputs of the matcher.h and matcher.cc

* Add Quatro mode in a Python wrapper

* Make normal estimation based on OMP as well.

* Add API with normal vectors for easy integration with the `xyznormal` mode of ROBIN

* Clean unused variables

* Fix error in the example (change == to =)

* Remove weird semicolon to cover #99

* Remove [[nodiscard]] to cover #140

* Add 'InsertNewlineAtEOF' in the .clang-format

* Add newline at the end of file using .clang-format

* (Minor) Clean codes, e.g., managing double space, redundant line break, no-space, etc, via .clang-format
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

No branches or pull requests

2 participants