From b9d0839c6e9bc586e2862ff9457ac582354b8347 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 27 Apr 2020 09:46:34 +0200 Subject: Require explicit variable type in scope::{assign,append}() --- libbuild2/version/init.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libbuild2/version') diff --git a/libbuild2/version/init.cxx b/libbuild2/version/init.cxx index d30dc24..7c5d589 100644 --- a/libbuild2/version/init.cxx +++ b/libbuild2/version/init.cxx @@ -226,13 +226,14 @@ namespace build2 // Note also that we have "gifted" the config.version variable name to // the config module. // - auto set = [&rs] (auto var, auto val) + auto set = [&rs] (const char* var, auto val) { - rs.assign (var, move (val)); + using T = decltype (val); + rs.assign (var, move (val)); }; - if (!sum.empty ()) set (ctx.var_project_summary, move (sum)); - if (!url.empty ()) set (ctx.var_project_url, move (url)); + if (!sum.empty ()) rs.assign (ctx.var_project_summary, move (sum)); + if (!url.empty ()) rs.assign (ctx.var_project_url, move (url)); set ("version", v.string ()); // Project version (var_version). -- cgit v1.1