I had a typo (|| instead of |) and noticed such a code fails with GCC and compiles with Visual.
I know that the second parameter of std::ifstream is an int. So theoretically, a bool has to be converted implicitely to an int. So why it fails?
Example inducing the error (I just used some ints instead of the flags).
#include <fstream>
int main(int argc, char * argv[]) {
std::ifstream("foo", 2 | 3 || 4)
}