From d823982f22dcce0152dd73abde028dee0b7a60f6 Mon Sep 17 00:00:00 2001 From: dhood Date: Tue, 5 Dec 2017 15:12:20 -0800 Subject: [PATCH] Allow logger to be passed into macros as a reference (#423) * Remove reference for logger so it can be rclcpp::Logger & This is the type when captured by reference in a lambda; windows can't resolve it without. * Wrap lines --- rclcpp/resource/logging.hpp.em | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rclcpp/resource/logging.hpp.em b/rclcpp/resource/logging.hpp.em index 238f019..24753f8 100644 --- a/rclcpp/resource/logging.hpp.em +++ b/rclcpp/resource/logging.hpp.em @@ -85,7 +85,9 @@ def is_supported_feature_combination(feature_combination): * \param ... The format string, followed by the variable arguments for the format string */ #define RCLCPP_@(severity)@(suffix)(logger, @(''.join([p + ', ' for p in get_macro_parameters(feature_combination).keys()]))...) \ - static_assert(::std::is_same::value, "First argument to logging macros must be an rclcpp::Logger"); \ + static_assert( \ + ::std::is_same::type, ::rclcpp::Logger>::value, \ + "First argument to logging macros must be an rclcpp::Logger"); \ RCUTILS_LOG_@(severity)@(suffix)_NAMED( \ @{params = get_macro_parameters(feature_combination).keys()}@ @[ if params]@