Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/compilersupport_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,14 @@

#ifdef __cplusplus
# define CONST_CAST(t, v) const_cast<t>(v)
# define CBOR_NULLPTR nullptr
#else
/* C-style const_cast without triggering a warning with -Wcast-qual */
# define CONST_CAST(t, v) (t)(uintptr_t)(v)
#endif

#if defined(__cplusplus) || __STDC_VERSION__ >= 202311
# define CBOR_NULLPTR nullptr
#else
# define CBOR_NULLPTR NULL
#endif

Expand Down
Loading