|
Boost : |
From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2004-09-19 05:07:31
"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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk