[PATCH] Use __typeof__ so <guiddef.h> is compatible with -std=c++11

Puetz Kevin A PuetzKevinA at JohnDeere.com
Wed Jul 15 08:06:28 CDT 2020


the typeof(...) extension is available in -std=gnu++11,
but c++11 considers it replaced by decltype(...) and off-by-default
__uuidof does need GNU __typeof__(), not decltype(), for c++03 support and
because both __uuidof(typename) and __uuidof(expression) should work,
but decltype(typename) is not accepted

Signed-off-by: Kevin Puetz <PuetzKevinA at JohnDeere.com>
---
 include/guiddef.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/guiddef.h b/include/guiddef.h
index 546c450043..664f74fac3 100644
--- a/include/guiddef.h
+++ b/include/guiddef.h
@@ -74,7 +74,7 @@ extern "C++" {
         __WINE_UUID_ATTR const GUID __wine_uuidof<type>::uuid = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}; \
     }
 
-#define __uuidof(type) __wine_uuidof_type<typeof(type)>::inst::uuid
+#define __uuidof(type) __wine_uuidof_type<__typeof__(type)>::inst::uuid
 
 #else /* __WINE_UUID_ATTR */
 




More information about the wine-devel mailing list