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

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

Messages

Date: 2000-10-15.00:00:00

Proposed resolution (10/00): As suggested.

Date: 2003-04-25.00:00:00

The wording of 9.4 [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.3 [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.

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