diff --git a/rclcpp/include/rclcpp/node.hpp b/rclcpp/include/rclcpp/node.hpp index 746ad5c7b2..c1a89434e1 100644 --- a/rclcpp/include/rclcpp/node.hpp +++ b/rclcpp/include/rclcpp/node.hpp @@ -163,15 +163,21 @@ class Node typename ServiceT, typename FunctorT, typename std::enable_if< - function_traits::arity == 2 && + function_traits::arity == 2 + >::type * = nullptr, + typename std::enable_if< std::is_same< typename function_traits::template argument_type<0>, typename std::shared_ptr - >::value && + >::value + >::type * = nullptr, + typename std::enable_if< std::is_same< typename function_traits::template argument_type<1>, typename std::shared_ptr - >::value>::type * = nullptr> + >::value + >::type * = nullptr + > typename rclcpp::service::Service::SharedPtr create_service_internal( rmw_service_t * service_handle, @@ -188,15 +194,27 @@ class Node typename ServiceT, typename FunctorT, typename std::enable_if< - function_traits::arity == 3 && + function_traits::arity == 3 + >::type * = nullptr, + typename std::enable_if< std::is_same< typename function_traits::template argument_type<0>, std::shared_ptr - >::value && + >::value + >::type * = nullptr, + typename std::enable_if< std::is_same< typename function_traits::template argument_type<1>, typename std::shared_ptr - >::value>::type * = nullptr> + >::value + >::type * = nullptr, + typename std::enable_if< + std::is_same< + typename function_traits::template argument_type<2>, + typename std::shared_ptr + >::value + >::type * = nullptr + > typename rclcpp::service::Service::SharedPtr create_service_internal( rmw_service_t * service_handle,