Skip to content

Instantly share code, notes, and snippets.

@griwes
Created November 9, 2014 19:12
Show Gist options
  • Save griwes/e5d10dc7e5a7b9ffb899 to your computer and use it in GitHub Desktop.
Save griwes/e5d10dc7e5a7b9ffb899 to your computer and use it in GitHub Desktop.
// functional:
return boost::join(map(_name.id_expression_value, [](auto && elem) { return elem.string; }), ".");
// C++:
std::vector<std::string> tmp;
tmp.reserve(_name.id_expression_value.size());
std::transform(_name.id_expression_value.begin(), _name.id_expression_value.end(), std::back_inserter(tmp), [](auto && elem) { return elem.string; });
return boost::join(tmp, ".");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment