| 110 | /// Iterator mixin, uses CRTP to inject iterator logic into Derived. |
| 111 | template <typename Derived> |
| 112 | class iterator_mixin { |
| 113 | public: |
| 114 | using const_iterator = iterator_over<Derived>; |
| 115 | using const_reverse_iterator = reverse_iterator_over<Derived>; |
| 116 | |
| 117 | const_iterator begin() const noexcept { |
| 118 | return const_iterator(*static_cast<const Derived*>(this), 0); |
| 119 | } |
| 120 | const_iterator end() const noexcept { |
| 121 | return const_iterator(*static_cast<const Derived*>(this), |
| 122 | static_cast<const Derived*>(this)->size()); |
| 123 | } |
| 124 | const_reverse_iterator rbegin() const noexcept { |
| 125 | return const_reverse_iterator(*static_cast<const Derived*>(this), |
| 126 | static_cast<const Derived*>(this)->size()); |
| 127 | } |
| 128 | const_reverse_iterator rend() const noexcept { |
| 129 | return const_reverse_iterator(*static_cast<const Derived*>(this), 0); |
| 130 | } |
| 131 | }; |
| 132 | |
| 133 | } // namespace axis |
| 134 | } // namespace histogram |
nothing calls this directly
no outgoing calls
no test coverage detected