From Jason Turner

[basic.scope.param]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpiwfy2rl5/{from.md → to.md} +23 -12
tmp/tmpiwfy2rl5/{from.md → to.md} RENAMED
@@ -1,15 +1,26 @@
1
  ### Function parameter scope <a id="basic.scope.param">[[basic.scope.param]]</a>
2
 
3
- A function parameter (including one appearing in a *lambda-declarator*)
4
- or function-local predefined variable [[dcl.fct.def]] has *function
5
- parameter scope*. The potential scope of a parameter or function-local
6
- predefined variable begins at its point of declaration. If the nearest
7
- enclosing function declarator is not the declarator of a function
8
- definition, the potential scope ends at the end of that function
9
- declarator. Otherwise, if the function has a *function-try-block* the
10
- potential scope ends at the end of the last associated handler.
11
- Otherwise the potential scope ends at the end of the outermost block of
12
- the function definition. A parameter name shall not be redeclared in the
13
- outermost block of the function definition nor in the outermost block of
14
- any handler associated with a *function-try-block*.
 
 
 
 
 
 
 
 
 
 
 
15
 
 
1
  ### Function parameter scope <a id="basic.scope.param">[[basic.scope.param]]</a>
2
 
3
+ A *parameter-declaration-clause* P introduces a
4
+ *function parameter scope* that includes P.
5
+
6
+ [*Note 1*: A function parameter cannot be used for its value within the
7
+ *parameter-declaration-clause* [[dcl.fct.default]]. *end note*]
8
+
9
+ - If P is associated with a *declarator* and is preceded by a
10
+ (possibly-parenthesized) *noptr-declarator* of the form
11
+ *declarator-id* *attribute-specifier-seq*ₒₚₜ , its scope extends to
12
+ the end of the nearest enclosing *init-declarator*,
13
+ *member-declarator*, *declarator* of a *parameter-declaration* or a
14
+ *nodeclspec-function-declaration*, or *function-definition*, but does
15
+ not include the locus of the associated *declarator*. \[*Note 2*: In
16
+ this case, P declares the parameters of a function (or a function or
17
+ template parameter declared with function type). A member function’s
18
+ parameter scope is nested within its class’s scope. — *end note*]
19
+ - If P is associated with a *lambda-declarator*, its scope extends to
20
+ the end of the *compound-statement* in the *lambda-expression*.
21
+ - If P is associated with a *requirement-parameter-list*, its scope
22
+ extends to the end of the *requirement-body* of the
23
+ requires-expression.
24
+ - If P is associated with a *deduction-guide*, its scope extends to the
25
+ end of the *deduction-guide*.
26