
Daryle Walker wrote:
On 11/19/06 4:53 AM, "AlisdairM" <alisdair.meredith@uk.renaultf1.com> wrote:
This is another patch for a test case, as it is the test case that exploits the Borland bug.
Essentially, BOOST_STATIC_CONSTANT cannot be used inside a member template on this compiler, so we need to fall back on using an enum in those cases.
Isn't BOOST_STATIC_CONSTANT supposed to switch to an enum-based solution in those cases? Maybe the fix is to change the #defines that determine which implementation BOOST_STATIC_CONSTANT uses. Unless the problem is that the non-enum solution works in the same kinds of blocks that are not member class templates.
Yes, it does do so for Borland already, however the argument to BOOST_STATIC_ASSERT still has to be something that the Borland compiler can cope with. The usual culprit is something like: template <class T> void foo(T) { BOOST_STATIC_CONSTANT(int, value = something); BOOST_STATIC_ASSERT(value > 1); // fails on Borland as do all other uses of value *within this scope* } John.