Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-06-19 13:12:01


Terje Slettebø <tslettebo_at_[hidden]> writes:

>>From: "John Maddock" <john_at_[hidden]>
>
>> Anything that uses Boost.Test is currently failing with gcc-2.95.3, see
> for
>> example: http://tinyurl.com/dkreq
>>
>> I'm not sure if this is a lexical_cast or test lib change that's broken
>> things?
>
> It was probably the lexical_cast update. I see that Boost.Test uses it (the
> unit_test_parameters.ipp file). This presents something of a chicken-and-egg
> situation for lexical_cast, as its test also uses Boost.Test...
>
> However, I took a snapshot of the regression test result prior to the
> update, and even then, the lexical_cast test failed on gcc-2.95.3 (I don't
> have the linked-to pages showing the errors, though. We don't happen to have
> historical regression test results available somewhere?), so when it failed
> after the update, I thought it was the same problem. In the future, I'll
> make sure to note any regression test _error messages_ also, before
> updating.
>
> I see that it on both tests fail on this line in lexical_cast:
>
> /boost/head-regression/boost/boost/lexical_cast.hpp:157: parse error before
> `>'
>
> stream.get() == std::char_traits<char_type>::eof();
>
> Any idea how to detect gcc-2.95.3's problem, so we may revert to the
> original code for that one? (the above code ensures there aren't any
> whitespace left after a conversion)

Can't you just use a typedef?

      typedef std::char_traits<char_type> traits;

      ... stream.get() == traits::eof();

??

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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