Fix for a weird lambda execution problem in Windows.

One of the lambdas used in a "finally" expression executed already while defining the "finally" instance, which is way too early of course (others did not show this behavior), which happens only with the Visual Studio compiler, not clang. By changing the capture list to a general reference capture things started working as they should.
This commit is contained in:
Mike Lischke 2016-05-05 10:02:29 +02:00
parent 8ff852640a
commit 0fada33ceb
1 changed files with 8 additions and 8 deletions

View File

@ -501,7 +501,7 @@ Ref\<<parser.name>::<currentRule.ctxType>\> <parser.name>::<currentRule.name>(in
<namedActions.init>
<! TODO: untested !> <locals; separator = "\n">
auto onExit = finally([this, parentContext] {
auto onExit = finally([&] {
<! TODO: untested !><if (finallyAction)><finallyAction><endif>
unrollRecursionContexts(parentContext);
});