@@ -9,13 +9,13 @@ namespace Nz
99 template <typename E, typename V>
1010 constexpr auto EnumArray<E, V>::iter_kv() noexcept -> kv_iter_tag
1111 {
12- return kv_iter_tag{ * this };
12+ return kv_iter_tag{ this };
1313 }
1414
1515 template <typename E, typename V>
1616 constexpr auto EnumArray<E, V>::iter_kv() const noexcept -> kv_const_iter_tag
1717 {
18- return kv_const_iter_tag{ * this };
18+ return kv_const_iter_tag{ this };
1919 }
2020
2121 template <typename E, typename V>
@@ -40,7 +40,7 @@ namespace Nz
4040 template <typename E, typename V>
4141 constexpr typename EnumArray<E, V>::kv_iterator EnumArray<E, V>::kv_iter_tag::end() noexcept
4242 {
43- return EnumArray<E, V>::kv_iterator (*this , arrayRef. size ());
43+ return EnumArray<E, V>::kv_iterator (*this , arrayRef-> size ());
4444 }
4545
4646 template <typename E, typename V>
@@ -52,7 +52,7 @@ namespace Nz
5252 template <typename E, typename V>
5353 constexpr typename EnumArray<E, V>::kv_const_iterator EnumArray<E, V>::kv_const_iter_tag::end() const noexcept
5454 {
55- return EnumArray<E, V>::kv_const_iterator (*this , arrayRef. size ());
55+ return EnumArray<E, V>::kv_const_iterator (*this , arrayRef-> size ());
5656 }
5757
5858
@@ -125,55 +125,55 @@ namespace Nz
125125 constexpr auto EnumArrayKvIterator<E, V, Const>::operator *() const noexcept -> value_type
126126 {
127127 E enumKey = static_cast <E>(m_index);
128- return std::make_pair (enumKey, std::ref (m_array[enumKey]));
128+ return std::make_pair (enumKey, std::ref ((* m_array) [enumKey]));
129129 }
130130
131131 template <typename E, typename V, bool Const>
132132 constexpr auto EnumArrayKvIterator<E, V, Const>::operator [](difference_type n) const noexcept -> value_type
133133 {
134134 E enumKey = static_cast <E>(m_index + n);
135- return std::make_pair (enumKey, std::ref (m_array[enumKey]));
135+ return std::make_pair (enumKey, std::ref ((* m_array) [enumKey]));
136136 }
137137
138138 template <typename E, typename V, bool Const>
139139 constexpr bool EnumArrayKvIterator<E, V, Const>::operator ==(const EnumArrayKvIterator& rhs) const noexcept
140140 {
141- assert (& m_array == & rhs.m_array );
141+ assert (m_array == rhs.m_array );
142142 return m_index == rhs.m_index ;
143143 }
144144
145145 template <typename E, typename V, bool Const>
146146 constexpr bool EnumArrayKvIterator<E, V, Const>::operator !=(const EnumArrayKvIterator& rhs) const noexcept
147147 {
148- assert (& m_array == & rhs.m_array );
148+ assert (m_array == rhs.m_array );
149149 return m_index != rhs.m_index ;
150150 }
151151
152152 template <typename E, typename V, bool Const>
153153 constexpr bool EnumArrayKvIterator<E, V, Const>::operator <(const EnumArrayKvIterator& rhs) const noexcept
154154 {
155- assert (& m_array == & rhs.m_array );
155+ assert (m_array == rhs.m_array );
156156 return m_index < rhs.m_index ;
157157 }
158158
159159 template <typename E, typename V, bool Const>
160160 constexpr bool EnumArrayKvIterator<E, V, Const>::operator <=(const EnumArrayKvIterator& rhs) const noexcept
161161 {
162- assert (& m_array == & rhs.m_array );
162+ assert (m_array == rhs.m_array );
163163 return m_index <= rhs.m_index ;
164164 }
165165
166166 template <typename E, typename V, bool Const>
167167 constexpr bool EnumArrayKvIterator<E, V, Const>::operator >(const EnumArrayKvIterator& rhs) const noexcept
168168 {
169- assert (& m_array == & rhs.m_array );
169+ assert (m_array == rhs.m_array );
170170 return m_index > rhs.m_index ;
171171 }
172172
173173 template <typename E, typename V, bool Const>
174174 constexpr bool EnumArrayKvIterator<E, V, Const>::operator >=(const EnumArrayKvIterator& rhs) const noexcept
175175 {
176- assert (& m_array == & rhs.m_array );
176+ assert (m_array == rhs.m_array );
177177 return m_index >= rhs.m_index ;
178178 }
179179
0 commit comments