Template Function rsl::one_of

Function Documentation

template<typename T>
auto rsl::one_of(rclcpp::Parameter const &parameter, std::vector<T> const &collection) -> tl::expected<void, std::string>

Is the parameter value one of a set of values?

Template Parameters:

T – Interior type of parameter; e.g. for parameter type int, T = int64_t

Pre:

rclcpp::Parameter must be a non-array type

Returns:

Help string if the parameter is invalid, otherwise void