The switch statement has commands to manage its flow, which are break and [[fallthrough]].
break forces the flow to jump out of the switch and [[fallthrough]] keeps executing commands ignoring the case validation (actually that is the default behavior of switch). For example:
switch (x) {
case 0:
...statements...
break; //will jump to (...after switch statements...)
case 1:
...statements...
[[fallthrough]]; //don't jump
case 2:
...statements... //will be executed if x == 1 or x == 2
}
...after switch statements...
Why was [[fallthrough]] defined with square brackets if break wasn't?
*The command [[fallthrough]] was introduced in C++17 as indicated at site cppreference.