projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tracepoint API namespacing '__tp_stringify'
[lttng-ust.git]
/
include
/
lttng
/
ust-utils.h
diff --git
a/include/lttng/ust-utils.h
b/include/lttng/ust-utils.h
index baca88f271184840512ea97745320d8bef65e333..13d2a7ae1a3049d6815b707320977604678ea2be 100644
(file)
--- 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.
*/
*
* 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) \
* 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)
;
+ Non_integer_type__##item##__not_supported_as_element_of_CTF_ARRAY_or_CTF_SEQUENCE)
/**
/**
This page took
0.02353 seconds
and
4
git commands to generate.