mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-05 13:19:21 +02:00
glib: Use G_CXX_STD_VERSION to check how to behave with C++ compilers
This commit is contained in:
@@ -195,7 +195,7 @@ typedef void (*GTestFixtureFunc) (gpointer fixture,
|
||||
} G_STMT_END
|
||||
|
||||
/* Use nullptr in C++ to catch misuse of these macros. */
|
||||
#if defined(__cplusplus) && __cplusplus >= 201100L
|
||||
#if G_CXX_STD_CHECK_VERSION (11)
|
||||
#define g_assert_null(expr) G_STMT_START { if G_LIKELY ((expr) == nullptr) ; else \
|
||||
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
||||
"'" #expr "' should be nullptr"); \
|
||||
|
Reference in New Issue
Block a user