
On 12/12/2012 00.45, Olaf van der Spek wrote:
On Wed, Dec 12, 2012 at 12:40 AM, Gaetano Mendola <mendola@gmail.com> 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). Regards Gaetano Mendola