|
Boost-Build : |
From: Eric Niebler (eric_at_[hidden])
Date: 2004-02-29 12:42:39
David Abrahams wrote:
> "John Maddock" <john_at_[hidden]> writes:
>
>
>>>The error is on the line marked ***here***. What I'm guessing is that
>>>Borland defines an overload of std::max for intrinsic types, or just
>>>unsigned long, which does not return a reference, but I'm just guessing
>>>here. Can anybody who has access to this toolset confirm? And how can
>>>I test a fix?
>>
>>Yes, Borland's headers define:
>>
>>inline unsigned long min (unsigned long __a, unsigned long __b)
>>{
>>return min<unsigned long> (__a, __b);
>>}
>>
>>inline unsigned long max (unsigned long __a, unsigned long __b)
>>{
>>return max<unsigned long> (__a, __b);
>>}
>>
>>I'm not sure what the best fix is here,
>
>
> You can detect at compile-time whether a call will yield an lvalue by
> checking to see whether the restult can bind to a T& argument, where
> T is a template parameter. See boost/iterator/is_lvalue_iterator.hpp.
>
That's too complicated for such a simple thing. I could just add my own
overloads of boost::std_min and boost::std_max for unsigned int. I don't
even have to limit their existence to the Borland toolset. I'll check
it in ASAP to unwedge the Borland build.
Thanks.
-- Eric Niebler Boost Consulting www.boost-consulting.com
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk