|
|
|
|
|
by barrkel
5480 days ago
|
|
No, I'm not; I explicitly mentioned closures which capture state precisely because that's where C++0x gets thorny. You can capture by copying or by reference; what you don't get is wholesale movement of the variable into a heap-allocated location, the way variable capture works in almost every other language supporting free mutation of variables. I wrote about it in an earlier thread: http://news.ycombinator.com/item?id=2617990 |
|
BTW the behavior you describe has been achieved in the C language family with Apple's C block extension, not that it's relevant since it's in no way standard (aside from Objective-C++)