7 template<
typename T,
typename S>
8 inline void serialize(std::stringstream& ss,
const std::pair<T,S>& pair) {
9 ss <<
"[" << pair.first <<
"," << pair.second <<
"]";
13 inline void serialize(std::stringstream& ss,
const std::vector<T>& v) {
17 template<
typename Key,
typename Value,
typename Comparator>
18 inline void serialize(std::stringstream& ss,
const std::map<Key, Value, Comparator>& m) {
19 return ss <<
stream_joined(
";", m, [](
auto& o,
const auto& p){ o << p.first <<
"=" << p.second; });
auto stream_joined(const std::string &glue, const T &v)
Allows to easily output some container with all elements separated by some string.
void serialize(std::stringstream &ss, const std::pair< T, S > &pair)