| 592 | |
| 593 | template <class TVariant, class T> |
| 594 | void TestVariantImpl(TVariant& v, const T& expected) { |
| 595 | v = expected; |
| 596 | |
| 597 | TBufferStream s; |
| 598 | ::Save(&s, v); |
| 599 | ::Load(&s, v); |
| 600 | UNIT_ASSERT_VALUES_EQUAL(std::get<T>(v), expected); |
| 601 | } |
| 602 | |
| 603 | void TestVariant() { |
| 604 | std::variant<int, bool, TString, TVector<char>> v(1); |