Skip to content

Bump to c++17#184

Closed
rotu wants to merge 1 commit intoros:ros2from
RoverRobotics-forks:pr-4
Closed

Bump to c++17#184
rotu wants to merge 1 commit intoros:ros2from
RoverRobotics-forks:pr-4

Conversation

@rotu
Copy link

@rotu rotu commented Mar 31, 2020

replaces #182

This allows us to use std::filesystem, as the logic in filesystem_helper sniffs the current c++ standard. CMake should fall back gracefully to c++14 if c++17 is not available.

This is a correct solution but not the best one, which would be add a library which wraps filesystem and which we link to instead of imposing compilation constraints on consuming projects

This allows us to use std::filesystem, as the logic in filesystem_helper sniffs the current c++ standard. CMake should fall back gracefully to c++14 if c++17 is not available.
@rotu
Copy link
Author

rotu commented Mar 31, 2020

Discussion here: #182
Note:

even if we're targeting CMake 14, setting CMAKE_CXX_STANDARD to a newer version will fall back to the previous supported standard if 17 is unavailable.

  • experimental/filesystem is not part of either C++14 nor C++17, and in a compiler that implements C++17 should not be used.
  • std::filesystem is not part of C++14.

@nuclearsandwich nuclearsandwich added the ros2 Issues and PRs relating to ROS 2 label Apr 21, 2020
@clalancette
Copy link
Contributor

Obsoleted by #212, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ros2 Issues and PRs relating to ROS 2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants