aboutsummaryrefslogtreecommitdiff
path: root/butl
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-04-19 02:28:27 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-19 04:18:44 +0200
commitbab5f9b799e5b64c59ad9c78070a4254fe9ceeab (patch)
treedf86f23a46cd9eff9374043128bdf7f88463b9af /butl
parent23a129810c6c2fc6abc37945079733eb98121282 (diff)
Fix parameter pack expansion in process_start() for Clang
Diffstat (limited to 'butl')
-rw-r--r--butl/process-run.txx9
1 files changed, 7 insertions, 2 deletions
diff --git a/butl/process-run.txx b/butl/process-run.txx
index 4437488..9de601f 100644
--- a/butl/process-run.txx
+++ b/butl/process-run.txx
@@ -58,9 +58,14 @@ namespace butl
small_vector<const char*, args_size + 2> cmd;
cmd.push_back (pp.recall_string ());
+ auto call = [&cmd] (const auto& x, std::string& s) -> const char*
+ {
+ process_args_as (cmd, x, s);
+ return nullptr;
+ };
+
std::string storage[args_size != 0 ? args_size : 1];
- const char* dummy[] = {
- nullptr, (process_args_as (cmd, args, storage[index]), nullptr)... };
+ const char* dummy[] = {nullptr, call (args, storage[index])... };
cmd.push_back (dummy[0]); // NULL (and get rid of unused warning).