title: How can I make a function that takes either a map or an unordered_map?
body: <p>I'm implementing some template-based serialization. I implemented the templated function for <code>std::map</code>, but now I'm using an <code>std::unordered_map</code>. I would rather not copy &amp; paste the entire function and just change the parameter type. Is there any way to make a template which takes only a map or an unordered map?</p>