diff --git a/rclcpp/include/rclcpp/parameter.hpp b/rclcpp/include/rclcpp/parameter.hpp index 3da59bb..266eb45 100644 --- a/rclcpp/include/rclcpp/parameter.hpp +++ b/rclcpp/include/rclcpp/parameter.hpp @@ -150,7 +150,8 @@ public: return value_.bool_value; } template - typename std::enable_if>::type + typename std::enable_if &>::type get_value() const { if (value_.parameter_type != rcl_interfaces::ParameterType::PARAMETER_BYTES) { @@ -168,7 +169,10 @@ public: bool as_bool() const {return get_value(); } - std::vector as_bytes() const {return get_value(); } + const std::vector & as_bytes() const + { + return get_value(); + } private: std::string name_;