From Jason Turner

[stmt.select]

Diff to HTML by rtfpessoa

tmp/tmpylsrnwyv/{from.md → to.md} RENAMED
@@ -22,11 +22,11 @@ condition.
22
  *selection-statement* has a block scope
23
  [[basic.scope.block]]. — *end note*]
24
 
25
  ### The `if` statement <a id="stmt.if">[[stmt.if]]</a>
26
 
27
- If the condition [[stmt.pre]] yields `true` the first substatement is
28
  executed. If the `else` part of the selection statement is present and
29
  the condition yields `false`, the second substatement is executed. If
30
  the first substatement is reached via a label, the condition is not
31
  evaluated and the second substatement is not executed. In the second
32
  form of `if` statement (the one including `else`), if the first
@@ -169,13 +169,13 @@ if consteval statement₂ else compound-statement₁
169
  ### The `switch` statement <a id="stmt.switch">[[stmt.switch]]</a>
170
 
171
  The `switch` statement causes control to be transferred to one of
172
  several statements depending on the value of a condition.
173
 
174
- The value of a *condition* that is an initialized declaration is the
175
- value of the declared variable, or the value of the *expression*
176
- otherwise. The value of the condition shall be of integral type,
177
  enumeration type, or class type. If of class type, the condition is
178
  contextually implicitly converted [[conv]] to an integral or enumeration
179
  type. If the (possibly converted) type is subject to integral promotions
180
  [[conv.prom]], the condition is converted to the promoted type. Any
181
  statement within the `switch` statement can be labeled with one or more
 
22
  *selection-statement* has a block scope
23
  [[basic.scope.block]]. — *end note*]
24
 
25
  ### The `if` statement <a id="stmt.if">[[stmt.if]]</a>
26
 
27
+ If the condition [[stmt.pre]] yields `true`, the first substatement is
28
  executed. If the `else` part of the selection statement is present and
29
  the condition yields `false`, the second substatement is executed. If
30
  the first substatement is reached via a label, the condition is not
31
  evaluated and the second substatement is not executed. In the second
32
  form of `if` statement (the one including `else`), if the first
 
169
  ### The `switch` statement <a id="stmt.switch">[[stmt.switch]]</a>
170
 
171
  The `switch` statement causes control to be transferred to one of
172
  several statements depending on the value of a condition.
173
 
174
+ If the *condition* is an *expression*, the value of the condition is the
175
+ value of the *expression*; otherwise, it is the value of the decision
176
+ variable. The value of the condition shall be of integral type,
177
  enumeration type, or class type. If of class type, the condition is
178
  contextually implicitly converted [[conv]] to an integral or enumeration
179
  type. If the (possibly converted) type is subject to integral promotions
180
  [[conv.prom]], the condition is converted to the promoted type. Any
181
  statement within the `switch` statement can be labeled with one or more