X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=include%2Flttng%2Fust-utils.h;h=2a65dd5364ef21e996ea7c05d17dff9a09887e8f;hb=f26f2f9bb496a2dc053095310ab8d42b63a3b556;hp=baca88f271184840512ea97745320d8bef65e333;hpb=d465835d05ead88505e49aa62319b22dfc1fc026;p=lttng-ust.git diff --git a/include/lttng/ust-utils.h b/include/lttng/ust-utils.h index baca88f2..2a65dd53 100644 --- a/include/lttng/ust-utils.h +++ b/include/lttng/ust-utils.h @@ -28,7 +28,11 @@ * * 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::value) +#else +#define lttng_ust_is_signed_type(type) ((type) -1 < (type) 1) +#endif /**