In the first case, you create a boolean variable from an expression. maybe
std::cout << std::is_constructible<decltype((33 & 3)), bool>::value<<std::endl;
In the second case, you build the int variable from the expression. Type of this expressionint
std::cout << typeid(b & 3).name() << std::endl;
And finally, you use implicit type conversion from int to bool and get a warning.
source
share