lttng_ust_static_assert: remove extra semicolons
[lttng-ust.git] / include / lttng / ust-utils.h
index baca88f271184840512ea97745320d8bef65e333..13d2a7ae1a3049d6815b707320977604678ea2be 100644 (file)
  *
  * 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
 
 
 /**
@@ -61,9 +65,9 @@
  * user are of an integral type.
  */
 #define lttng_ust_ctf_array_element_type_is_supported(type, item) \
-               lttng_static_assert(lttng_ust_is_integer_type(type), \
+               lttng_ust_static_assert(lttng_ust_is_integer_type(type), \
                        "Non-integer type `" #item "` not supported as element of CTF_ARRAY or CTF_SEQUENCE", \
-                       Non_integer_type__##item##__not_supported_as_element_of_CTF_ARRAY_or_CTF_SEQUENCE);
+                       Non_integer_type__##item##__not_supported_as_element_of_CTF_ARRAY_or_CTF_SEQUENCE)
 
 
 /**
This page took 0.026137 seconds and 4 git commands to generate.