Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2003-01-24 10:17:00


Hugo Duncan wrote:
> Including for_each.hpp on bcc561 gives
>
> Error E2230
> c:\usr\boost\boost/mpl/aux_/preprocessed/bcc/template_arity.hp
> p 20: In-line data member initialization requires an integral
> constant expression
>
> Any chance of finding a fix for this? I am having problems
> working through the code to see what to change.

Hmm, seem to work for me on 5.6 (__BORLANDC__ == 0x560):

>
Borland C++ 5.6 for Win32 Copyright (c) 1993, 2002 Borland
F:\cvs_main8\boost\libs\mpl\test\for_each.cpp:
Warning W8012 F:\cvs_main8\boost\libs\mpl\test\for_each.cpp 82: Comparing
signed and unsigned values in function main()
<

I don't have access to 5.6.1, so I would need some cooperation to fix it.
Off the top of my head, can you please check if changing the offending line
from

        static int const value = F::arity;

to
        enum { value = F::arity };

helps at all? If it doesn't, how about the one below?

        static int const value = BOOST_MPL_AUX_MSVC_VALUE_WKND(F)::arity;

(you'll need to include "boost/mpl/aux_/value_wknd.hpp" for that).

Aleksey


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