 |
ros2_control - rolling
|
Loading...
Searching...
No Matches
15#ifndef HARDWARE_INTERFACE__MACROS_HPP_
16#define HARDWARE_INTERFACE__MACROS_HPP_
22#include "rcpputils/pointer_traits.hpp"
25#define __PRETTY_FUNCTION__ __FUNCTION__
28#define THROW_ON_NULLPTR(pointer) \
30 rcpputils::is_pointer<typename std::remove_reference<decltype(pointer)>::type>::value, \
31 #pointer " has to be a pointer"); \
34 throw std::runtime_error(std::string(__PRETTY_FUNCTION__) + " failed. " #pointer " is null."); \
37#define THROW_ON_NOT_NULLPTR(pointer) \
39 rcpputils::is_pointer<typename std::remove_reference<decltype(pointer)>::type>::value, \
40 #pointer " has to be a pointer"); \
43 throw std::runtime_error( \
44 std::string(__PRETTY_FUNCTION__) + " failed. " #pointer " would leak memory"); \