0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-09 21:48:55 +02:00

ircd:Ⓜ️🆔 Use generate template; optimize printer.

This commit is contained in:
Jason Volk 2020-05-26 03:30:38 -07:00
parent b698f80067
commit 8bfdd7884b

View file

@ -370,12 +370,23 @@ const
};
}};
const auto gg
mutable_buffer buf
{
maxwidth(size_t(stop - out))[std::forward<decltype(g)>(g)] | eps[throws]
out, stop
};
return karma::generate(out, gg, std::forward<decltype(a)>(a));
const auto gg
{
std::forward<decltype(g)>(g) | eps[throws]
};
const auto ret
{
generate(buf, gg, std::forward<decltype(a)>(a))
};
out = buffer::data(buf);
return ret;
}
template<class gen>
@ -395,12 +406,23 @@ const
};
}};
const auto gg
mutable_buffer buf
{
maxwidth(size_t(stop - out))[std::forward<decltype(g)>(g)] | eps[throws]
out, stop
};
return karma::generate(out, gg);
const auto gg
{
std::forward<decltype(g)>(g) | eps[throws]
};
const auto ret
{
generate(buf, gg)
};
out = buffer::data(buf);
return ret;
}
template<class... args>