Confused by use of double logical not (!!) operator [duplicate]
问题 This question already has answers here : Double Negation in C++ code (14 answers) What is “!!” in C? [duplicate] (7 answers) Closed 6 years ago . I have some C++ code that makes extensive use of !! . I'm kinda baffled because as far as I know !! is not a operator on it's own but two ! after each other. So that would mean that !!foo is the same as just foo . Is there any place and or reason when !! actually makes sense? I was thinking about if it could perhaps have a bit wise meaning? So you