Boost logo

Boost :

From: news.gmane.org (software_at_[hidden])
Date: 2003-03-04 10:32:30


"Alisdair Meredith" <alisdair.meredith_at_[hidden]> wrote in message
news:3E62D6A6.288C6C85_at_uk.renaultf1.com...
> It appears the current borland compiler has several problems when
> linking with the dyanmic version of the RTL, most noticably (in boost
> regressions) wrt std::numeric limits. These problems go away when
> linking statically to the RTL. Would it be viable to change the
> regression builds to support this?
>
I think that the only correct fix is to fix STLPort.
The problem is that:

(a) _STL_STATIC_CONST_INT_BUG (or some like that)
is used to flag out of line integral constants, as used in numeric_limits<>,
but the STLPort that ships with BCB6 incorrectly sets this flag as if BCB
couldn't handle in-class integral constants (which it does handle)

(b) A STLPort header (which I can remember now) figures that when
linking to the RTL DLL, which in turn directs usage of dynamic STLPort
(DLL),
decides to set _STL_STATIC_CONST_INT_BUG (whatever the compiler) because
according to the comment 'integral constants are not exported' (!?)

The real problem is that numeric_limits<> is useless in template
metaprogramming since it doesn't expose true constant expressions, so the
real fix has to be made here.

> I have tried #define BOOST_NO_LIMITS in the borland config as a
> workaround, but it seems the STL implementation itself will use <limits>
> leading to duplicate definitions, causing more problems than it solves
> (mainly fixes some issues for the interval library.)
>
Yeah.
That's why I think this cannot be solved from the boost side.

Fernando Cacciola


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