Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2008-06-26 03:04:06


Ion Gaztañaga wrote:
> Markus Schöpflin wrote:

[...]

>> The patch should replace the compile error by a link error, because in
>> strict Ansi mode EDG doesn't allow you to refer to non-existing names.
>>
>> OK to apply?
>
> Please, go ahead. I just want to get a compilation error when this
> funcion is called, but with gcc 4.3 BOOST_STATIC_ASSERT((false)) is
> instantiated even if the function is called (other compilers just are
> fine). If this is changed to a linking error, is better than a run-time
> error. If you have any idea for this, let me know.

OK, I applied the patch. You might want to massage the comment a bit, and
probably extend the condition to include GCC 3.4 as well.

I also tried using BOOST_STATIC_ASSERT(false) but I also get the compile
error, so I have no other idea besides turning the compile time error into
a link time error.

BTW, I think there is no test (expected-to-fail) which actually checks that
your helpful catch-all code is actually working as expected. But now you
would need two tests anyway, depending on the compiler. I don't know if
this is supported by Boost.Build out of the box.

Regards,
Markus


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk