32 class Iterator final {
33 using Base = std::conditional_t<Const,
const Value, Value>;
34 using RawIterator =
decltype(std::declval<Base&>().begin());
37 using iterator_category = std::forward_iterator_tag;
38 using difference_type = std::ptrdiff_t;
39 using value_type = ItemsWrapperValue<Base>;
40 using reference = value_type;
44 explicit Iterator(RawIterator it) : it_(std::move(it)) {}
47 Iterator(
const Iterator& other) =
default;
48 Iterator(Iterator&& other)
noexcept =
default;
50 Iterator& operator=(
const Iterator& other) =
default;
51 Iterator& operator=(Iterator&& other)
noexcept =
default;
53 reference operator*()
const {
return {it_.GetName(), *it_}; }
55 Iterator operator++(
int) {
61 Iterator& operator++() {
66 bool operator==(
const Iterator& other)
const {
return it_ == other.it_; }
68 bool operator!=(
const Iterator& other)
const {
return !(*
this == other); }