+#ifdef __WATCOMC__
+
+// WATCOM-FIXME: C++ of Open Watcom 1.3 doesn't like OnScopeExit() created
+// through template so it must be workarounded with dedicated inlined macro.
+// For compatibility with Watcom compilers wxPrivate::OnScopeExit must be
+// replaced with wxPrivateOnScopeExit but in user code (for everyone who
+// doesn't care about OW compatibility) wxPrivate::OnScopeExit still works.
+
+#define wxPrivateOnScopeExit(guard) \
+ { \
+ if ( !(guard).WasDismissed() ) \
+ { \
+ wxTRY \
+ { \
+ (guard).Execute(); \
+ } \
+ wxCATCH_ALL(;) \
+ } \
+ }
+
+#define wxPrivateUse(n) wxUnusedVar(n)
+
+#else
+