Skip to content

Commit 7133dbb

Browse files
RexJaeschkeBillWagner
authored andcommitted
Add support for static anonymous functions
1 parent 421ce4a commit 7133dbb

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

standard/expressions.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5578,11 +5578,7 @@ A local variable is considered to be ***instantiated*** when execution enters th
55785578
>
55795579
> *end example*
55805580
5581-
<<<<<<< HEAD
55825581
When not captured, there is no way to observe exactly how often a local variable is instantiatedbecause the lifetimes of the instantiations are disjoint, it is possible for each instantiation to simply use the same storage location. However, when a non-`static` anonymous function captures a local variable, the effects of instantiation become apparent.
5583-
=======
5584-
When not captured, there is no way to observe exactly how often a local variable is instantiatedbecause the lifetimes of the instantiations are disjoint, it is possible for each instantiation to simply use the same storage location. However, when a non-`static` anonymous function captures a local variable, the effects of instantiation become apparent.
5585-
>>>>>>> 7857046 (Add support for static anonymous functions)
55865582
55875583
> *Example*: The example
55885584
>

standard/unsafe-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ The `&` operator ([§24.6.5](unsafe-code.md#2465-the-address-of-operator)) permi
261261
262262
In precise terms, a fixed variable is one of the following:
263263
264-
- A variable resulting from a *simple_name* ([§12.8.4](expressions.md#1284-simple-names)) that refers to a local variable, value parameter, or parameter array, unless the variable is captured by an anonymous function ([§12.21.6.2](expressions.md#122162-captured-outer-variables)).
264+
- A variable resulting from a *simple_name* ([§12.8.4](expressions.md#1284-simple-names)) that refers to a local variable, value parameter, or parameter array, unless the variable is captured by a non-`static` anonymous function ([§12.21.6.2](expressions.md#122162-captured-outer-variables)).
265265
- A variable resulting from a *member_access* ([§12.8.7](expressions.md#1287-member-access)) of the form `V.I`, where `V` is a fixed variable of a *struct_type*.
266266
- A variable resulting from a *pointer_indirection_expression* ([§24.6.2](unsafe-code.md#2462-pointer-indirection)) of the form `*P`, a *pointer_member_access* ([§24.6.3](unsafe-code.md#2463-pointer-member-access)) of the form `P->I`, or a *pointer_element_access* ([§24.6.4](unsafe-code.md#2464-pointer-element-access)) of the form `P[E]`.
267267

0 commit comments

Comments
 (0)