
On 12/12/2012 14.21, Jeff Flinn wrote:
On 12/12/2012 2:46 AM, Gaetano Mendola wrote:
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.
So does:
return !!get_thread_info();
You really like it, don't you? Do whatever you wish but in my opinion write a !!get_thread_info(); over a more clear get_thread_info() != 0; means to immolate simplicity over the altar of the cleverness. Regards Gaetano Mendola -- http://cpp-today.blogspot.it/