Skip to content

Commit

Permalink
parameter capturing was added
Browse files Browse the repository at this point in the history
Signed-off-by: Alex <cvbn127@gmail.com>
  • Loading branch information
cvbn127 authored and ivanpauno committed Sep 6, 2019
1 parent 265f565 commit aacef1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rclcpp/include/rclcpp/parameter_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,11 @@ class SyncParametersClient
{
return get_parameter_impl(
parameter_name,
std::function<T()>([]() -> T {throw std::runtime_error("Parameter '" + parameter_name + "' is not set");}));
std::function<T()>([parameter_name]() -> T
{
throw std::runtime_error("Parameter '" + parameter_name + "' is not set");
})
);
}

RCLCPP_PUBLIC
Expand Down

0 comments on commit aacef1c

Please sign in to comment.