It’s a trick to convert to bool.
More Related Contents:
- Is sizeof(bool) defined in the C++ language standard?
- Alternative to vector
- How to create a byte out of 8 bool values (and vice versa)?
- Can I assume (bool)true == (int)1 for any C++ compiler?
- Does true equal to 1 and false equal to 0? [duplicate]
- String literal matches bool overload instead of std::string
- C++ printing boolean, what is displayed?
- Is C/C++ bool type always guaranteed to be 0 or 1 when typecast’ed to int?
- Why is a boolean 1 byte and not 1 bit of size?
- What is the printf format specifier for bool?
- C++ : why bool is 8 bits long?
- Can a bool read/write operation be not atomic on x86? [duplicate]
- Is the use of std::vector objects in C++ acceptable, or should I use an alternative?
- bool operator ++ and —
- Why the sizeof(bool) is not defined to be one, by the Standard itself?
- Why is there an implicit type conversion from pointers to bool in C++?
- Using bitwise operators for Booleans in C++
- Why is a char and a bool the same size in c++?
- Casting int to bool in C/C++
- Is !! a safe way to convert to bool in C++?
- Is it ok to read a shared boolean flag without locking it when another thread may set it (at most once)?
- Converting bool to text in C++
- Why use !! when converting int to bool?
- Setting extra bits in a bool makes it true and false at the same time
- C++ bool returns 0 1 instead of true false
- How is a bool represented in memory?
- Why is a C++ bool var true by default?
- Type erasure in C++: how boost::shared_ptr and boost::function work?
- Why does a virtual function get hidden?
- Implementing the visitor pattern using C++ Templates