13 lines
393 B
Diff
13 lines
393 B
Diff
--- a/glib/glib-typeof.h
|
|
+++ b/glib/glib-typeof.h
|
|
@@ -36,7 +36,9 @@
|
|
#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 */
|
|
+extern "C++" {
|
|
#include <type_traits>
|
|
+}
|
|
#define glib_typeof(t) typename std::remove_reference<decltype (t)>::type
|
|
#endif
|
|
|