What? I've been coding in multiple languages for multiple platforms for almost 30 years and have never come across it. It seems rather unlikely that it's 'extremely common'
It is very common in C code, where for most of its history you hadn't any explicit boolean data type but used int, following the rule that zero is false and anything else is true.
The '!!expr' is the idiom most people use whenever the need for a canonical 0/1 representation arises.
The '!!expr' is the idiom most people use whenever the need for a canonical 0/1 representation arises.