Correct fix to the compile time assert under OW. Kudos to Vadim to the tip.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-10-20 01:20:58 +00:00
parent 8e5d510855
commit 1c6f24145e
6 changed files with 67 additions and 61 deletions

View File

@@ -198,8 +198,17 @@
It may be used both within a function and in the global scope.
*/
#define wxCOMPILE_TIME_ASSERT(expr, msg) \
struct wxMAKE_UNIQUE_ASSERT_NAME { unsigned int msg: expr; }
#ifdef __WATCOMC__
/* avoid "unused symbol" warning */
#define wxCOMPILE_TIME_ASSERT(expr, msg) \
class wxMAKE_UNIQUE_ASSERT_NAME { \
unsigned int msg: expr; \
wxMAKE_UNIQUE_ASSERT_NAME(){wxUnusedVar(msg);} \
}
#else
#define wxCOMPILE_TIME_ASSERT(expr, msg) \
struct wxMAKE_UNIQUE_ASSERT_NAME { unsigned int msg: expr; }
#endif
/* for compatibility only, don't use any more, not needed */