Moved std::enable_if to template parameters
This commit is contained in:
parent
814f4101db
commit
faba591f3d
1 changed files with 32 additions and 28 deletions
|
@ -159,7 +159,9 @@ private:
|
||||||
std::shared_ptr<rclcpp::service::ServiceBase> serv_base_ptr,
|
std::shared_ptr<rclcpp::service::ServiceBase> serv_base_ptr,
|
||||||
rclcpp::callback_group::CallbackGroup::SharedPtr group);
|
rclcpp::callback_group::CallbackGroup::SharedPtr group);
|
||||||
|
|
||||||
template<typename ServiceT, typename FunctorT>
|
template<
|
||||||
|
typename ServiceT,
|
||||||
|
typename FunctorT,
|
||||||
typename std::enable_if<
|
typename std::enable_if<
|
||||||
function_traits<FunctorT>::arity == 2 &&
|
function_traits<FunctorT>::arity == 2 &&
|
||||||
std::is_same<
|
std::is_same<
|
||||||
|
@ -169,8 +171,8 @@ private:
|
||||||
std::is_same<
|
std::is_same<
|
||||||
typename function_traits<FunctorT>::template argument_type<1>,
|
typename function_traits<FunctorT>::template argument_type<1>,
|
||||||
typename std::shared_ptr<typename ServiceT::Response>
|
typename std::shared_ptr<typename ServiceT::Response>
|
||||||
>::value,
|
>::value>::type * = nullptr>
|
||||||
typename rclcpp::service::Service<ServiceT>::SharedPtr>::type
|
typename rclcpp::service::Service<ServiceT>::SharedPtr
|
||||||
create_service_internal(
|
create_service_internal(
|
||||||
rmw_service_t * service_handle,
|
rmw_service_t * service_handle,
|
||||||
const std::string & service_name,
|
const std::string & service_name,
|
||||||
|
@ -182,7 +184,9 @@ private:
|
||||||
service_handle, service_name, callback_without_header);
|
service_handle, service_name, callback_without_header);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename ServiceT, typename FunctorT>
|
template<
|
||||||
|
typename ServiceT,
|
||||||
|
typename FunctorT,
|
||||||
typename std::enable_if<
|
typename std::enable_if<
|
||||||
function_traits<FunctorT>::arity == 3 &&
|
function_traits<FunctorT>::arity == 3 &&
|
||||||
std::is_same<
|
std::is_same<
|
||||||
|
@ -196,8 +200,8 @@ private:
|
||||||
std::is_same<
|
std::is_same<
|
||||||
typename function_traits<FunctorT>::template argument_type<2>,
|
typename function_traits<FunctorT>::template argument_type<2>,
|
||||||
typename std::shared_ptr<typename ServiceT::Response>
|
typename std::shared_ptr<typename ServiceT::Response>
|
||||||
>::value,
|
>::value>::type * = nullptr>
|
||||||
typename rclcpp::service::Service<ServiceT>::SharedPtr>::type
|
typename rclcpp::service::Service<ServiceT>::SharedPtr
|
||||||
create_service_internal(
|
create_service_internal(
|
||||||
rmw_service_t * service_handle,
|
rmw_service_t * service_handle,
|
||||||
const std::string & service_name,
|
const std::string & service_name,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue