...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::histogram::axis::iterator_mixin — Uses CRTP to inject iterator logic into Derived.
// In header: <boost/histogram/axis/iterator.hpp> template<typename Derived> class iterator_mixin { public: // types typedef iterator< Derived > const_iterator; typedef std::reverse_iterator< const_iterator > const_reverse_iterator; // public member functions const_iterator begin() const noexcept; const_iterator end() const noexcept; const_reverse_iterator rbegin() const noexcept; const_reverse_iterator rend() const noexcept; };
iterator_mixin
public member functionsconst_iterator begin() const noexcept;Bin iterator to beginning of the axis (read-only).
const_iterator end() const noexcept;Bin iterator to the end of the axis (read-only).
const_reverse_iterator rbegin() const noexcept;Reverse bin iterator to the last entry of the axis (read-only).
const_reverse_iterator rend() const noexcept;Reverse bin iterator to the end (read-only).