diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-16 19:03:08 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-16 19:03:08 +0200 |
commit | aded6de920f420b5c36fee1081c795cf8c6c6dc9 (patch) | |
tree | ea62cba64fdd01cb8ae0a67611038e9522d6fa4d /build/algorithm.cxx | |
parent | e62aef8ebe4b4b7eb733da6822d7759c0427222b (diff) |
Rely on as few C++14 features as possible
Diffstat (limited to 'build/algorithm.cxx')
-rw-r--r-- | build/algorithm.cxx | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/build/algorithm.cxx b/build/algorithm.cxx index b296929..a2ee7c0 100644 --- a/build/algorithm.cxx +++ b/build/algorithm.cxx @@ -145,12 +145,11 @@ namespace build { auto g ( make_exception_guard ( - [](action a, target& t, const string& n) + [ra, &t, &n]() { info << "while matching rule " << n << " to " - << diag_do (a, t); - }, - ra, t, n)); + << diag_do (ra, t); + })); if (!(m = ru.match (ra, t, hint))) continue; @@ -173,12 +172,11 @@ namespace build { auto g ( make_exception_guard ( - [](action a, target& t, const string& n1) + [ra, &t, &n1]() { info << "while matching rule " << n1 << " to " - << diag_do (a, t); - }, - ra, t, n1)); + << diag_do (ra, t); + })); if (!ru1.match (ra, t, hint)) continue; @@ -203,12 +201,11 @@ namespace build { auto g ( make_exception_guard ( - [](action a, target& t, const string& n) + [ra, &t, &n]() { info << "while applying rule " << n << " to " - << diag_do (a, t); - }, - ra, t, n)); + << diag_do (ra, t); + })); // @@ We could also allow the rule to change the recipe // action in apply(). Could be useful with delegates. @@ -352,12 +349,11 @@ namespace build { auto g ( make_exception_guard ( - [](action a, target& t) + [a, &t]() { t.raw_state = target_state::failed; info << "while " << diag_doing (a, t); - }, - a, t)); + })); target_state ts (t.recipe (a) (a, t)); assert (ts != target_state::unknown && ts != target_state::failed); |