|
Boost : |
From: John Maddock (john_at_[hidden])
Date: 2006-11-22 04:54:24
Daryle Walker wrote:
> On 11/19/06 4:53 AM, "AlisdairM" <alisdair.meredith_at_[hidden]>
> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk