mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 11:56:16 +01:00
glib-typeof: Define glib_typeof on on older C++ standard versions
When using an older C++ versions, the glib_typeof() macro is never defined, as the C++ definition depends on __cplusplus >= 201103L, while the C definition, which would work, depends on !defined(__cplusplus). Allow old C++ versions to use the C macro definition for glib_typeof().
This commit is contained in:
parent
1cbe7a6734
commit
d050ad8a3c
@ -34,7 +34,7 @@
|
||||
* This symbol is private.
|
||||
*/
|
||||
#undef glib_typeof
|
||||
#if !defined(__cplusplus) && (G_GNUC_CHECK_VERSION(4, 8) || defined(__clang__))
|
||||
#if (!defined(__cplusplus) || __cplusplus < 201103L) && (G_GNUC_CHECK_VERSION(4, 8) || defined(__clang__))
|
||||
#define glib_typeof(t) __typeof__ (t)
|
||||
#elif defined(__cplusplus) && __cplusplus >= 201103L && GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_68
|
||||
/* C++11 decltype() is close enough for our usage */
|
||||
|
Loading…
Reference in New Issue
Block a user