I know that C++03 doesn't allow to define variables within switch block without using curly braces.
const int i = ...
switch (i) { case 0: int j = 0; break; } // 1. error here
switch (i) { case 0: { int j = 0; } break; } // 2. ok
What is regarding new C++11 standard? Does it allow first form? Can I also write something like this:
switch (i)
{
case 0: int j = 0; break;
case 1: int j = 0; break;
case 2: int j = 0; break;
}