Skip to content

Instantly share code, notes, and snippets.

@motonacciu
Created July 26, 2012 16:03
Show Gist options
  • Select an option

  • Save motonacciu/3182921 to your computer and use it in GitHub Desktop.

Select an option

Save motonacciu/3182921 to your computer and use it in GitHub Desktop.
template <typename Arg1, typename Arg2, typename Arg3, typename... Args>
auto makeTree(const Arg1& arg1, const Arg2& arg2, const Arg3& arg3, const Args&... args) ->
std::pair<Arg1,decltype(makeTree(arg2,arg3,args...))>
{
return {arg1, makeTree(arg2,arg3,args...)};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment