Switches with both uniform and varying "switch" expressions are supported. Switch statements with varying expressions and very large numbers of labels may not perform well; some issues to be filed shortly will track opportunities for improving these.
10 lines
138 B
Plaintext
10 lines
138 B
Plaintext
// Case statement value must be a compile-time integer constant
|
|
|
|
void foo(float f) {
|
|
switch (f) {
|
|
case 1.5:
|
|
++f;
|
|
}
|
|
}
|
|
|