19 Mar
2008
19 Mar
'08
5:09 p.m.
Erik wrote:
John Maddock skrev: How about something like this:
#if __SOME_BROKEN_PLATFORM__ #define BOOST_STATIC_ASSERT whatever workaround is needed #elsif __SOME_OTHER_BROKEN_PLATFORM__ #define BOOST_STATIC_ASSERT whatever workaround is needed . . . #else #define BOOST_STATIC_ASSERT typedef bool STATIC_ASSERT_FAILURE[(x) ? 1 : -1] #endif
Well, because that was about the very first thing that was proposed for this utility and it got rejected for reasons that are lost in the mists of time now :-( We had an unreasonably long discussion about static assert and how to implement it that I'd rather not re-visit if possible. However, the attached seems to work OK and fix the warning, can you double check where you are? John.