From e0986692ef230466cfe3eb0029bac359aae1ea13 Mon Sep 17 00:00:00 2001 From: q66 Date: Thu, 26 Apr 2018 00:42:48 +0200 Subject: [PATCH] make body fix --- ostd/build/make.hh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ostd/build/make.hh b/ostd/build/make.hh index aac7e7d..f17990a 100644 --- a/ostd/build/make.hh +++ b/ostd/build/make.hh @@ -82,9 +82,13 @@ struct make_rule { } make_rule &body(std::function act_f) noexcept { - p_body = [act_f = std::move(act_f)](auto, auto) { - act_f(); - }; + if (act_f) { + p_body = [act_f = std::move(act_f)](auto, auto) { + act_f(); + }; + } else { + p_body = body_func{}; + } return *this; }