#include <iostream>
int main() {
bool b = true;
std::cout << std::is_same<decltype(!(!b)), bool>::value << "\n";
auto bb = (!(!b));
std::cout << std::is_same<decltype(bb), bool>::value << "\n";
}
The above code has different results using different compilers. Is this a compiler bug or am I missing something?
- clang 1 1 (https://godbolt.org/z/s43T55rxq)
- msvc 1 1 (https://godbolt.org/z/YnKfKh41q)
- gcc 0 1 (https://godbolt.org/z/91xdfv93c)