| 161 | |
| 162 | template <class T> |
| 163 | inline std::string mapToString(T map, const std::string& prefix1 = "", const std::string& prefix2 = "") |
| 164 | { |
| 165 | std::ostringstream ss; |
| 166 | ss << "{ "; |
| 167 | bool first = true; |
| 168 | for (auto &v : map) |
| 169 | { |
| 170 | if (!first) |
| 171 | ss << ", "; |
| 172 | first = false; |
| 173 | |
| 174 | ss << "{" << prefix1 << v.first << ", " << prefix2 << v.second << "}"; |
| 175 | } |
| 176 | ss << " }"; |
| 177 | return ss.str(); |
| 178 | } |
no outgoing calls