Skip to content

Update the examples to C++17.#353

Merged
clalancette merged 1 commit intorollingfrom
clalancette/update-to-c++17
Jan 6, 2023
Merged

Update the examples to C++17.#353
clalancette merged 1 commit intorollingfrom
clalancette/update-to-c++17

Conversation

@clalancette
Copy link
Copy Markdown
Contributor

The main reason to do this is so that we can compile the examples with the clang static analyzer. As of clang++-14 (what is in Ubuntu 22.04), the default still seems to be C++14, so we need to specify C++17 so that new things in the rclcpp headers work properly.

Further, due to reasons I don't fully understand, I needed to set CMAKE_CXX_STANDARD_REQUIRED in order for clang to really use that version. So set this as well.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

The main reason to do this is so that we can compile the examples
with the clang static analyzer.  As of clang++-14 (what is in
Ubuntu 22.04), the default still seems to be C++14, so we need
to specify C++17 so that new things in the rclcpp headers work
properly.

Further, due to reasons I don't fully understand, I needed to
set CMAKE_CXX_STANDARD_REQUIRED in order for clang to really use
that version.  So set this as well.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette clalancette force-pushed the clalancette/update-to-c++17 branch from 39f1e1e to 11e54ba Compare January 6, 2023 14:51
@clalancette clalancette changed the title Update the examples to C++17. (#594) Update the examples to C++17. Jan 6, 2023
@clalancette
Copy link
Copy Markdown
Contributor Author

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@clalancette clalancette merged commit e88a302 into rolling Jan 6, 2023
@clalancette clalancette deleted the clalancette/update-to-c++17 branch January 6, 2023 20:09
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

Successfully merging this pull request may close these issues.

2 participants