diff --git a/rclcpp/include/rclcpp/qos.hpp b/rclcpp/include/rclcpp/qos.hpp index 512a638..6f7db78 100644 --- a/rclcpp/include/rclcpp/qos.hpp +++ b/rclcpp/include/rclcpp/qos.hpp @@ -105,8 +105,11 @@ public: durability(rmw_qos_durability_policy_t durability); /// Set the durability setting to volatile. + /** + * Note that this cannot be named `volatile` because it is a C++ keyword. + */ QoS & - volatile(); + durability_volatile(); /// Set the durability setting to transient local. QoS & diff --git a/rclcpp/src/rclcpp/qos.cpp b/rclcpp/src/rclcpp/qos.cpp index a909f30..bec92fd 100644 --- a/rclcpp/src/rclcpp/qos.cpp +++ b/rclcpp/src/rclcpp/qos.cpp @@ -120,7 +120,7 @@ QoS::durability(rmw_qos_durability_policy_t durability) } QoS & -QoS::volatile() +QoS::durability_volatile() { return this->durability(RMW_QOS_POLICY_DURABILITY_VOLATILE); }