I saw an odd code snippet(seen below). ):
Is there any potential problem with this code snippet when using C++11 and perior to C++11? The aforementioned code snippet really compiles and works well with gcc.
#include <iostream>
#include <array>
#include <algorithm>
int main() {
switch (1) {
default:
std::cout << "in default" << std::endl;
break;
case (1):
std::cout << "in case 1" << std::endl;
break;
}
return 0;
}