Tweak the way register restorers are created to try to fix OSX compilation

This commit is contained in:
Maxime Coste 2018-05-03 08:13:45 +10:00
parent d882d51643
commit a19ce37634

View File

@ -1566,8 +1566,9 @@ void context_wrap(const ParametersParser& parser, Context& context, Func func)
RegisterManager::instance()[c].set(context, save);
});
};
auto saved_registers = parser.get_switch("save-regs").value_or("/\"|^@") |
transform(make_register_restorer) | gather<Vector<decltype(make_register_restorer(0))>>();
Vector<decltype(make_register_restorer(0))> saved_registers;
for (auto c : parser.get_switch("save-regs").value_or("/\"|^@"))
saved_registers.push_back(make_register_restorer(c));
if (auto bufnames = parser.get_switch("buffer"))
{