We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a5c46a commit baf7c93Copy full SHA for baf7c93
src/include/c.h
@@ -1245,7 +1245,10 @@ typedef union PGAlignedXLogBlock
1245
* Note that this only works in function scope, not for global variables (it'd
1246
* be nice, but not trivial, to improve that).
1247
*/
1248
-#if defined(HAVE__BUILTIN_TYPES_COMPATIBLE_P)
+#if defined(__cplusplus)
1249
+#define unconstify(underlying_type, expr) const_cast<underlying_type>(expr)
1250
+#define unvolatize(underlying_type, expr) const_cast<underlying_type>(expr)
1251
+#elif defined(HAVE__BUILTIN_TYPES_COMPATIBLE_P)
1252
#define unconstify(underlying_type, expr) \
1253
(StaticAssertExpr(__builtin_types_compatible_p(__typeof(expr), const underlying_type), \
1254
"wrong cast"), \
0 commit comments