Boost logo

Boost :

Subject: Re: [boost] [assert][lightweight_test] Quick review of proposedchanges
From: Beman Dawes (bdawes_at_[hidden])
Date: 2011-01-24 10:19:40


On Mon, Jan 24, 2011 at 9:54 AM, Peter Dimov <pdimov_at_[hidden]> wrote:
> Beman Dawes wrote:
> ...
>>
>> >> * Messages are now sent do BOOST_LIGHTWEIGHT_TEST_OSTREAM
>> >
>> > I'm sorry if I missed the explanation for it... what is the use case of
>> > > this
>> > feature?
>>
>> The motivating use case is the Microsoft Visual Studio IDE, which
>> treats cout and cerr as two separate streams. So you get all the cout
>> output followed by all the cerr output, when what you really want is
>> the equivalent of command line 2>&1
>
> Thanks. I saw that <iostream> is conditionally included only when the macro
> is left undefined, and I wondered whether it shouldn't be included in either
> case. It seems to me that it should; the motivating use would then be
>
> #ifdef BOOST_MSVC
> #define BOOST_LIGHTWEIGHT_TEST_OSTREAM std::cout
> #endif
>
> instead of the less intuitive
>
> #ifdef BOOST_MSVC
> #include <iostream>
> #define BOOST_LIGHTWEIGHT_TEST_OSTREAM std::cout
> #endif
>
> Yes, in principle, the latter is "more correct", but I think that in
> practice the former is preferable.

OK, will change.

--Beman


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