| 45 | |
| 46 | template <class Container> |
| 47 | void ConstTest(Container& cont) { |
| 48 | using value_type = typename Container::value_type; |
| 49 | using iterator = TIterator<Container, value_type>; |
| 50 | using const_iterator = TIterator<const Container, const value_type>; |
| 51 | |
| 52 | iterator it{ &cont, INIT_SIZE / 2 }; |
| 53 | const_iterator cit1{ it }; |
| 54 | const_iterator cit2{ &cont, INIT_SIZE / 2 }; |
| 55 | |
| 56 | UNIT_ASSERT_EQUAL(cit1, cit2); |
| 57 | |
| 58 | static_assert(std::is_same<decltype(*it), value_type&>::value); |
| 59 | static_assert(std::is_same<decltype(*cit1), const value_type&>::value); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | Y_UNIT_TEST_SUITE(TIteratorTest) { |