*
* Returns true if the type of @type is signed.
*/
-#define lttng_ust_is_signed_type(type) ((type) -1 < (type) 1)
+#if defined(__cplusplus)
+#define lttng_ust_is_signed_type(type) (std::is_signed<type>::value)
+#else
+#define lttng_ust_is_signed_type(type) ((type) -1 < (type) 1)
+#endif
/**
#define lttng_ust_is_integer_type(type) \
(__builtin_types_compatible_p(type, _Bool) || \
__builtin_types_compatible_p(type, char) || \
+ __builtin_types_compatible_p(type, signed char) || \
__builtin_types_compatible_p(type, unsigned char) || \
__builtin_types_compatible_p(type, short) || \
__builtin_types_compatible_p(type, unsigned short) || \