9 const auto &proj = [](
const auto &x) ->
decltype(
auto) {
return x; }) {
10 if (container.empty())
12 auto penult = std::prev(container.end());
13 auto quote_concat = [&](std::string &&a,
const auto &b) {
14 return a +
"'" + std::string(proj(b)) +
"', ";
16 return std::accumulate(container.begin(), penult, std::string{},
18 "'" + std::string(proj(*penult)) +
"'";
std::string format_string_list(const auto &container, const auto &proj=[](const auto &x) -> decltype(auto) { return x;})