summaryrefslogtreecommitdiff
path: root/pkmem-types.h
diff options
context:
space:
mode:
Diffstat (limited to 'pkmem-types.h')
-rw-r--r--pkmem-types.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkmem-types.h b/pkmem-types.h
index cf779d9..7f7a2ac 100644
--- a/pkmem-types.h
+++ b/pkmem-types.h
@@ -18,13 +18,17 @@ struct pk_handle {
pk_handle_item_index_T itemIndex;
};
-#define PK_HANDLE_MAX ((struct pk_handle){ .bucketIndex = 0xFFFFFFFF, .itemIndex = 0xFFFFFFFF })
+#if ! defined(__cplusplus)
+ #define PK_HANDLE_MAX ((struct pk_handle){ .bucketIndex = 0xFFFFFFFF, .itemIndex = 0xFFFFFFFF })
+#else
+ #define PK_HANDLE_MAX (pk_handle{ 0xFFFFFFFF, 0xFFFFFFFF })
+#endif
enum PK_HANDLE_VALIDATION pk_handle_validate(const struct pk_handle handle, const struct pk_handle bucketHandle, const uint64_t maxItems);
#if defined(__cplusplus)
-constexpr struct pk_handle pk_handle_MAX_constexpr = (struct pk_handle){ .bucketIndex = 0xFFFFFFFF, .itemIndex = 0xFFFFFFFF };
+constexpr struct pk_handle pk_handle_MAX_constexpr = { 0xFFFFFFFF, 0xFFFFFFFF };
inline constexpr bool
operator==(const pk_handle& lhs, const pk_handle& rhs)