Title
How many scopes in an if statement?
Status
tc1
Section
8.5 [stmt.select]
Submitter
Marc Paterno

Created on 2000-04-21.00:00:00 last changed 255 months ago

Messages

Date: 2000-10-15.00:00:00

Proposed resolution (10/00): As suggested.

Date: 2022-11-20.07:54:16

The wording of 8.5 [stmt.select] paragraph 1 is misleading. Instead of

The substatement in a selection-statement (both substatements, in the else form of the if statement) implicitly defines a local scope (6.4 [basic.scope]).

it should say

... each substatement, in the else form...

As is, one is left with the impression that both "then" and "else" clauses together form a single scope.

Proposed resolution (10/00): As suggested.

History
Date User Action Args
2003-04-25 00:00:00adminsetstatus: dr -> tc1
2000-11-18 00:00:00adminsetmessages: + msg443
2000-11-18 00:00:00adminsetstatus: open -> dr
2000-04-21 00:00:00admincreate