title: Using {} in a case statement. Why?
body: <p>What is the point with using <code>{</code> and <code>}</code> in a <code>case</code> statement? Normally, no matter how many lines are there in a <code>case</code> statement, all of the lines are executed. Is this just a rule regarding older/newer compilers or there is something behind that?</p>
  
  <pre><code>int a = 0;
  switch (a) {
    case 0:{
      std::cout &lt;&lt; "line1\n";
      std::cout &lt;&lt; "line2\n";
      break;
    }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>int a = 0;
  switch (a) {
    case 0:
      std::cout &lt;&lt; "line1\n";
      std::cout &lt;&lt; "line2\n";
      break;
  }
  </code></pre>