
"Ivan Vecerina" wrote:
do{ }while(__LINE__==-1)
Do you see a problem with this approach?
No.
Could this approach be used to stop disabling warning 4127 when boost is compiled?
Yes, probably.
Do other compilers have similar warnings and workarounds?
BCB often complains. It may be applicable here too.
Should a boost macro that expands to a warning-free always-false (or always-true) compile-time constant be considered? This would also allow statements such as BOOST_ASSERT(BOOST_FALSE), while(BOOST_TRUE), or do{...}while(BOOST_FALSE) to compile without warning...
I often use my macro CANNOT_HAPPEN and leave it in production code to get info on impossible-to-happen errors. If one could globally modify semantics of BOOST_ASSERT(BOOST_FALSE) to call similar macro or be nop or whatever it would be handy. /Pavel