Defining wxCOMPILE_TIME_ASSERT for OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9e96e16fe0
commit
7126436ab4
@ -380,6 +380,24 @@ extern void WXDLLIMPEXP_BASE wxOnAssert(const char *file,
|
||||
unsigned int msg: expr; \
|
||||
wxMAKE_UNIQUE_ASSERT_NAME() { wxUnusedVar(msg); } \
|
||||
}
|
||||
#elif defined( __VMS )
|
||||
namespace wxdebug{
|
||||
|
||||
// HP aCC cannot deal with missing names for template value parameters
|
||||
template <bool x> struct STATIC_ASSERTION_FAILURE;
|
||||
|
||||
template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
|
||||
|
||||
// HP aCC cannot deal with missing names for template value parameters
|
||||
template<int x> struct static_assert_test{};
|
||||
|
||||
}
|
||||
#define WX_JOIN( X, Y ) X##Y
|
||||
#define WX_STATIC_ASSERT_BOOL_CAST(x) (bool)(x)
|
||||
#define wxCOMPILE_TIME_ASSERT(expr, msg) \
|
||||
typedef ::wxdebug::static_assert_test<\
|
||||
sizeof(::wxdebug::STATIC_ASSERTION_FAILURE< WX_STATIC_ASSERT_BOOL_CAST( expr ) >)>\
|
||||
WX_JOIN(boost_static_assert_typedef_, __LINE__)
|
||||
#else
|
||||
#define wxCOMPILE_TIME_ASSERT(expr, msg) \
|
||||
struct wxMAKE_UNIQUE_ASSERT_NAME { unsigned int msg: expr; }
|
||||
|
@ -2599,12 +2599,7 @@ TestMessageBoxDialog::TestMessageBoxDialog(wxWindow *parent)
|
||||
"&Error icon"
|
||||
};
|
||||
|
||||
#ifndef __VMS
|
||||
// This contruction not is not valid on OpenVMS:
|
||||
// %CXX-W-REFNESTFUNVAR, reference to local variable of enclosing function is
|
||||
// not allowed
|
||||
wxCOMPILE_TIME_ASSERT( WXSIZEOF(icons) == MsgDlgIcon_Max, IconMismatch );
|
||||
#endif
|
||||
|
||||
m_icons = new wxRadioBox(this, wxID_ANY, "&Icon style",
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
|
Loading…
Reference in New Issue
Block a user