14 #include <type_traits>
28 template<
typename T, typename ::std::enable_if_t<
29 ::std::is_same<T, ::ros::Time>::value ||
30 ::std::is_same<T, ::ros::WallTime>::value ||
31 ::std::is_same<T, ::ros::SteadyTime>::value ||
32 ::std::is_same<T, ::ros::Duration>::value ||
33 ::std::is_same<T, ::ros::WallDuration>::value
37 ::std::stringstream ss;
48 template<
typename T, typename ::std::enable_if_t<
49 ::std::is_same<T, ::ros::Time>::value ||
50 ::std::is_same<T, ::ros::WallTime>::value ||
51 ::std::is_same<T, ::ros::SteadyTime>::value
55 template<
typename T, typename ::std::enable_if_t<
56 ::std::is_same<T, ::ros::Rate>::value ||
57 ::std::is_same<T, ::ros::WallRate>::value
59 inline ::std::string
to_string(
const T& value)
61 ::std::stringstream ss;
66 template<typename M, ::std::enable_if_t<::ros::message_traits::IsMessage<M>::value>* =
nullptr>
69 ::std::stringstream ss;
71 ::std::string
s = ss.str();
72 if (!
s.empty() &&
s[
s.length() - 1] ==
'\n')
73 s.erase(
s.length()-1);
93 ::std::is_same<D, ::ros::Duration>::value ||
94 ::std::is_same<D, ::ros::WallDuration>::value
124 template<
typename T =
::ros::Time, typename ::std::enable_if_t<
125 ::std::is_same<T, ::ros::Time>::value ||
126 ::std::is_same<T, ::ros::WallTime>::value ||
127 ::std::is_same<T, ::ros::SteadyTime>::value
130 const ::cras::optional<typename ::cras::DurationType<T>::value>& timezoneOffset = {},
const T& referenceDate = {});
151 ::std::is_same<D, ::ros::Duration>::value ||
152 ::std::is_same<D, ::ros::WallDuration>::value