15 #ifndef RCLCPP__FUNCTION_TRAITS_HPP_    16 #define RCLCPP__FUNCTION_TRAITS_HPP_    41 template<
typename Head, 
typename ... Tail>
    48 template<
typename FunctionT>
    56   template<std::
size_t N>
    63 template<
typename ReturnTypeT, 
typename ... Args>
    70   template<std::
size_t N>
    77 template<
typename ReturnTypeT, 
typename ... Args>
    82 template<
typename ClassT, 
typename ReturnTypeT, 
typename ... Args, 
typename ... FArgs>
    83 #if defined _LIBCPP_VERSION  // libc++ (Clang)    85 #elif defined _GLIBCXX_RELEASE  // glibc++ (GNU C++ >= 7.1)    86 struct 
function_traits<std::_Bind<ReturnTypeT(ClassT::*(FArgs ...))(Args ...)>>
    87 #elif defined __GLIBCXX__  // glibc++ (GNU C++)    88 struct 
function_traits<std::_Bind<std::_Mem_fn<ReturnTypeT (ClassT::*)(Args ...)>(FArgs ...)>>
    89 #elif defined _MSC_VER  // MS Visual Studio    91   std::_Binder<std::_Unforced, ReturnTypeT(__cdecl ClassT::*)(Args ...), FArgs ...>
    94 #error "Unsupported C++ compiler / standard library"   100 template<
typename ReturnTypeT, 
typename ... Args, 
typename ... FArgs>
   101 #if defined _LIBCPP_VERSION  // libc++ (Clang)   102 struct function_traits<
std::__1::__bind<ReturnTypeT( &)(Args ...), FArgs ...>>
   103 #elif defined __GLIBCXX__  // glibc++ (GNU C++)   104 struct function_traits<std::_Bind<ReturnTypeT(*(FArgs ...))(Args ...)>>
   105 #elif defined _MSC_VER  // MS Visual Studio   106 struct function_traits<std::_Binder<std::_Unforced, ReturnTypeT(__cdecl &)(Args ...), FArgs ...>>
   108 #error "Unsupported C++ compiler / standard library"   110   : function_traits<ReturnTypeT(Args ...)>
   114 template<
typename ClassT, 
typename ReturnTypeT, 
typename ... Args>
   119 template<
typename FunctionT>
   123 template<
typename FunctionT>
   131 template<std::
size_t Arity, 
typename FunctorT>
   133     bool, (Arity == function_traits<FunctorT>::arity)>{};
   135 template<
typename FunctorT, 
typename ... Args>
   137     typename function_traits<FunctorT>::arguments,
   142 template<
typename FunctorAT, 
typename FunctorBT>
   144     typename function_traits<FunctorAT>::arguments,
   145     typename function_traits<FunctorBT>::arguments
   153 #endif  // RCLCPP__FUNCTION_TRAITS_HPP_ ReturnTypeT return_type
Definition: function_traits.hpp:73
 
Definition: function_traits.hpp:136
 
Definition: function_traits.hpp:49
 
Definition: allocator_common.hpp:24
 
static constexpr std::size_t arity
Definition: function_traits.hpp:54
 
typename std::tuple_element< N, arguments >::type argument_type
Definition: function_traits.hpp:71
 
Definition: function_traits.hpp:143
 
typename function_traits< decltype(&ReturnTypeT(ClassT &, Args ...) ::operator())>::return_type return_type
Definition: function_traits.hpp:59
 
Definition: function_traits.hpp:132
 
typename tuple_tail< typename function_traits< decltype(&FunctionT::operator())>::arguments >::type arguments
Definition: function_traits.hpp:52
 
Definition: function_traits.hpp:39
 
typename std::tuple_element< N, arguments >::type argument_type
Definition: function_traits.hpp:57