6 Basic concepts [basic]

6.3 Scope [basic.scope]

6.3.3 Block scope [basic.scope.block]

A name declared in a block is local to that block; it has block scope.
Its potential scope begins at its point of declaration and ends at the end of its block.
A variable declared at block scope is a local variable.
The name declared in an exception-declaration is local to the handler and shall not be redeclared in the outermost block of the handler.
Names declared in the init-statement, the for-range-declaration, and in the condition of if, while, for, and switch statements are local to the if, while, for, or switch statement (including the controlled statement), and shall not be redeclared in a subsequent condition of that statement nor in the outermost block (or, for the if statement, any of the outermost blocks) of the controlled statement; see [stmt.select].