From 18ce5d8434947f361e9b13e2dcf31431b4647c51 Mon Sep 17 00:00:00 2001
From: Thomas Faber <thfabba@gmx.de>
Date: Sun, 14 Oct 2012 18:35:14 +0200
Subject: widl: Use 'class' for coclass typedefs in C++.

---
 tools/widl/header.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/widl/header.c b/tools/widl/header.c
index 02e3b60..2f275c7 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -1301,7 +1301,11 @@ static void write_coclass_forward(FILE *header, type_t *cocl)
 {
   fprintf(header, "#ifndef __%s_FWD_DEFINED__\n", cocl->name);
   fprintf(header, "#define __%s_FWD_DEFINED__\n", cocl->name);
+  fprintf(header, "#ifdef __cplusplus\n");
+  fprintf(header, "typedef class %s %s;\n", cocl->name, cocl->name);
+  fprintf(header, "#else\n");
   fprintf(header, "typedef struct %s %s;\n", cocl->name, cocl->name);
+  fprintf(header, "#endif /* defined __cplusplus */\n");
   fprintf(header, "#endif /* defined __%s_FWD_DEFINED__ */\n\n", cocl->name );
 }
 
-- 
1.7.11.msysgit.1
