|||
Symbol | Indicates |
---|---|
[] | Nothing to capture: an up-level reference is an error |
[&x, y, ...] | Capture as specified: identifiers prefixed by & are captured by reference; other identifiers are captured by copy. An up-level reference to any variable not explicitly listed is an error |
[&] | Capture by reference: an up-level reference implicitly captures the variable by reference |
[=] | Capture by copy: an up-level reference implicitly captures the variable by copy |
[&, x, y, ...] | Capture by reference with exceptions: listed variables are captured by value/copy (no listed variable may be prefixed by &) |
[=, &x, &y, ...] | Capture by copy with exceptions: listed variables are captured by reference only (every listed variable must be prefixed by &) |
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-9-28 12:12
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社