| 257 | |
| 258 | template <typename Field_t> |
| 259 | void |
| 260 | serializeField(std::ostream &os, Field_t const &f) |
| 261 | { |
| 262 | using namespace std; |
| 263 | // print containers as lists |
| 264 | if constexpr (has_const_iterator<Field_t>::value) { |
| 265 | os << "["; |
| 266 | for (auto const &a : f) { |
| 267 | serializeField(os, a); |
| 268 | os << ", "; |
| 269 | } |
| 270 | os << "]"; |
| 271 | return; |
| 272 | } else { |
| 273 | os << f; |
| 274 | } |
| 275 | } |
| 276 | // #################################################### |
| 277 | // #################################################### |
| 278 | // #################################################### |