| 255 | |
| 256 | template <typename Stream, typename Operation> |
| 257 | inline void SerializationOp(Stream& s, Operation ser_action) { |
| 258 | if (ser_action.ForRead()) { |
| 259 | str.clear(); |
| 260 | char c = 0; |
| 261 | while (true) { |
| 262 | try { |
| 263 | READWRITE(c); |
| 264 | str.push_back(c); |
| 265 | } catch (const std::ios_base::failure& e) { |
| 266 | break; |
| 267 | } |
| 268 | } |
| 269 | } else { |
| 270 | for (size_t i = 0; i < str.size(); i++) |
| 271 | READWRITE(str[i]); |
| 272 | } |
| 273 | } |
| 274 | }; |
| 275 | |
| 276 | BOOST_AUTO_TEST_CASE(iterator_string_ordering) |