Fixed deprecation warning for CPP targets > 17

This commit is contained in:
Pablo Blanco Celdrán 2020-06-04 15:55:39 +02:00
parent 621b933c7a
commit e7a10a070a
2 changed files with 10 additions and 1 deletions

View File

@ -242,4 +242,5 @@ YYYY/MM/DD, github id, Full name, email
2020/02/21, StochasticTinkr, Daniel Pitts, github@coloraura.com
2020/03/17, XsongyangX, Song Yang, songyang1218@gmail.com
2020/04/07, deniskyashif, Denis Kyashif, denis.kyashif@gmail.com
2020/04/30, TristonianJones, Tristan Swadell, tswadell@google.com
2020/04/30, TristonianJones, Tristan Swadell, tswadell@google.com
2020/06/04, sigmasoldi3r, Pablo Blanco, pablobc.1995@gmail.com

View File

@ -464,7 +464,11 @@ RuleFunction(currentRule, args, code, locals, ruleCtx, altLabelCtxs, namedAction
<namedActions.init>
<locals; separator = "\n">
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
<finallyAction>
exitRule();
});
@ -517,7 +521,11 @@ LeftRecursiveRuleFunction(currentRule, args, code, locals, ruleCtx, altLabelCtxs
<namedActions.init>
<! TODO: untested !> <locals; separator = "\n">
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
<if (finallyAction)><finallyAction><endif>
unrollRecursionContexts(parentContext);
});