Subject: Re: [boost] [smart_ptr][thread][test] breaking change on shared_ptr operator bool.
From: Gaetano Mendola (mendola_at_[hidden])
Date: 2012-12-12 02:46:20
On 12/12/2012 00.45, Olaf van der Spek wrote:
> On Wed, Dec 12, 2012 at 12:40 AM, Gaetano Mendola <mendola_at_[hidden]> wrote:
>> That's horrible.
> What's wrong with it?
> Can't we have somewhat more constructive posts. This isn't Twitter... ;)
> It's quite a simple idiom to get a bool from an expression.
You don't need to get a bool from an expression there, you need to
return true if the thread is joinable so a
return get_thread_info() != 0;
will do the job.
Also about compatibility, changing the operator bool in a library
available for 11 years will break a lot of code out there, if you
really plan to remove it for whatever reason leave it in place for a
few version, issuing warning at compile time (at least only people
treating warnings as errors will be affected).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk