Boost logo

Boost :

Subject: Re: [boost] [signals2] Test failure in C++11 (trivial fix for incorrect usage of boost::optional)
From: Frank Mori Hess (fmh6jj_at_[hidden])
Date: 2014-02-26 18:17:29


On Tue, Feb 25, 2014 at 10:58 PM, Ben Pope <benpope81_at_[hidden]> wrote:
> On Wednesday, December 11, 2013 03:26 PM, Ben Pope wrote:
>>
>>
>> The trivial fix is to change the if statements at:
>> .../libs/signals2/test/signal_test.cpp:32:16:
>> .../libs/signals2/test/track_test.cpp:36:14:
>>
>> to if(!max) rather than if(max == false).

Thanks for putting in the ticket, I never noticed the original mailing
list post back in December. I read the explanation of the problem
referred to in the original December post, however it seems to me the
bug is in optional's safe-bool implementation under c++11. That is,
the expression "max==false" should implicitly convert the optional
"max" to a boolean and compile.

-- 
Frank

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