added wxCOMPILE_TIME_ASSERT2() macro allowing to give the unique name to the struct used by wxCOMPILE_TIME_ASSERT() and use it in dynarray.h

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-02-07 12:33:40 +00:00
parent d77254fc5f
commit 8de1759c6f
2 changed files with 13 additions and 7 deletions

View File

@@ -186,8 +186,9 @@ private:
// ----------------------------------------------------------------------------
#define _WX_DEFINE_ARRAY(T, name, classexp) \
wxCOMPILE_TIME_ASSERT(sizeof(T) <= sizeof(long), \
TypeIsTooBigToBeStoredInWxArray); \
wxCOMPILE_TIME_ASSERT2(sizeof(T) <= sizeof(long), \
TypeIsTooBigToBeStoredInWxArray, \
name); \
typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \
classexp name : public wxBaseArray \
{ \
@@ -230,8 +231,9 @@ public: \
// ----------------------------------------------------------------------------
#define _WX_DEFINE_SORTED_ARRAY(T, name, defcomp, classexp) \
wxCOMPILE_TIME_ASSERT(sizeof(T) <= sizeof(long), \
TypeIsTooBigToBeStoredInWxArray); \
wxCOMPILE_TIME_ASSERT2(sizeof(T) <= sizeof(long), \
TypeIsTooBigToBeStoredInWxArray, \
name); \
typedef int (CMPFUNC_CONV *SCMPFUNC##T)(T pItem1, T pItem2); \
classexp name : public wxBaseArray \
{ \