Skip to content

Instantly share code, notes, and snippets.

@yosangwon
Forked from jiunbae/15-7-7
Created July 8, 2015 05:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yosangwon/2f9933ed699d29c26f29 to your computer and use it in GitHub Desktop.
Save yosangwon/2f9933ed699d29c26f29 to your computer and use it in GitHub Desktop.
template <typename type, typename std_type = std::allocator<type>>std::list<type, std_type> operator+(std::list<type, std_type> * operand, std::list<type> * operanded)
{
std::list<type> * list = new std::list<type>;
list.assign(operand.begin(), operand.end());
for_each(operanded.begin(), operanded.end(), [&list](type element)->void{ list.push_back(element); });
return list;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment