From c6af757edb1521206ed3ffbd54efa7347e8f57d9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 16 Aug 2018 13:30:07 +0200 Subject: [PATCH] Don't use WXDLLIMPEXP_FWD_BASE in typedef to fix clang build clang doesn't seem to like __declspec in typedefs, so declare the class first using the macro expanding into __declspec and don't use it in the typedef later. Closes #18196. --- include/wx/hash.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/wx/hash.h b/include/wx/hash.h index ea4e3021b2..ae552cd84e 100644 --- a/include/wx/hash.h +++ b/include/wx/hash.h @@ -40,10 +40,13 @@ union wxHashKeyValue // enough, so provide a real forward declaration class WXDLLIMPEXP_FWD_BASE wxHashTableBase; +// and clang doesn't like using WXDLLIMPEXP_FWD_BASE inside a typedef. +class WXDLLIMPEXP_FWD_BASE wxHashTableBase_Node; + class WXDLLIMPEXP_BASE wxHashTableBase_Node { - friend class WXDLLIMPEXP_FWD_BASE wxHashTableBase; - typedef class WXDLLIMPEXP_FWD_BASE wxHashTableBase_Node _Node; + friend class wxHashTableBase; + typedef class wxHashTableBase_Node _Node; public: wxHashTableBase_Node( long key, void* value, wxHashTableBase* table );