| 12 | |
| 13 | template <class T> |
| 14 | void test_write_read(const T& value) { |
| 15 | T result; |
| 16 | std::stringstream ss; |
| 17 | ss << boost::pfr::io(value); |
| 18 | ss >> boost::pfr::io(result); |
| 19 | BOOST_TEST_EQ(value.f0, result.f0); |
| 20 | BOOST_TEST_EQ(value.f1, result.f1); |
| 21 | BOOST_TEST_EQ(value.f2, result.f2); |
| 22 | BOOST_TEST_EQ(value.f3, result.f3); |
| 23 | BOOST_TEST_EQ(value.f4, result.f4); |
| 24 | } |
| 25 | |
| 26 | template <class T> |
| 27 | void to_string_test(const T& value, const char* ethalon) { |