[glib/glib-2-64: 1/2] gmacros.h: avoid using _Static_assert in C++17 mode



commit ce8e0aa4b9ea2168f85edec8e5c5b862eec848eb
Author: Alexander Pyhalov <apyhalov gmail com>
Date:   Tue Mar 17 22:00:05 2020 +0300

    gmacros.h: avoid using _Static_assert in C++17 mode
    
    Closes #2067

 glib/gmacros.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/gmacros.h b/glib/gmacros.h
index 1f4d779be..a770ac730 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -734,7 +734,7 @@
 #ifndef __GI_SCANNER__ /* The static assert macro really confuses the introspection parser */
 #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
 #define G_PASTE(identifier1,identifier2)      G_PASTE_ARGS (identifier1, identifier2)
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+#if !defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
 #define G_STATIC_ASSERT(expr) _Static_assert (expr, "Expression evaluates to false")
 #elif (defined(__cplusplus) && __cplusplus >= 201103L) || \
       (defined(__cplusplus) && defined (_MSC_VER) && (_MSC_VER >= 1600)) || \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]