-
Notifications
You must be signed in to change notification settings - Fork 436
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
use target_compile_features() to require C++17 features #1613
Conversation
Signed-off-by: Shane Loretz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unable to reproduce that failure locally with diff --git a/rclcpp/include/rclcpp/rclcpp.hpp b/rclcpp/include/rclcpp/rclcpp.hpp
index 56e999f7..3a3383e3 100644
--- a/rclcpp/include/rclcpp/rclcpp.hpp
+++ b/rclcpp/include/rclcpp/rclcpp.hpp
@@ -142,6 +142,7 @@
#include <csignal>
#include <memory>
+#include <variant>
#include "rclcpp/executors.hpp"
#include "rclcpp/guard_condition.hpp" Without steps to reproduce, I'll un-draft this one and run full CI |
It needed a bigger diff, including the c++17 header isn't enough to trigger compiler errors diff --git a/rclcpp/include/rclcpp/rclcpp.hpp b/rclcpp/include/rclcpp/rclcpp.hpp
index 56e999f7..faf88911 100644
--- a/rclcpp/include/rclcpp/rclcpp.hpp
+++ b/rclcpp/include/rclcpp/rclcpp.hpp
@@ -142,6 +142,7 @@
#include <csignal>
#include <memory>
+#include <variant>
#include "rclcpp/executors.hpp"
#include "rclcpp/guard_condition.hpp"
@@ -158,4 +159,11 @@
#include "rclcpp/waitable.hpp"
#include "rclcpp/wait_set.hpp"
+inline
+void
+use_cpp17()
+{
+ std::variant<int, float> foobar;
+}
+ |
Got steps to reproduce, one more fix needed: ros-visualization/rqt#246 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This is essentially what is in #1598.
I think, if CI is good, we should merge the other two prs, but not this one. It makes more sense to me turn on this requirement for rclcpp when we introduce the need. And the other two prs are good to have either way.
We're gonna close this in favor of #1598. |
Thanks for figuring out the details and fixing issues @sloretz! |
Requires ament/googletest#15
Draft, because @audrow has a similar change and is seeing failures in
rqt_gui_cpp