...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::stl_interfaces::iterator_interface
// In header: <boost/stl_interfaces/iterator_interface.hpp> template<typename Derived, typename IteratorConcept, typename ValueType, typename Reference, typename Pointer, typename DifferenceType> struct iterator_interface { // types typedef IteratorConcept iterator_concept; typedef iterator_concept iterator_category; typedef std::remove_const_t< ValueType > value_type; typedef Reference reference; typedef unspecified pointer; typedef DifferenceType difference_type; // public member functions template<typename D = Derived> constexpr auto operator*() noexcept(noexcept(*access::base(std::declval< D & >()))); template<typename D = Derived> constexpr auto operator*() const noexcept(noexcept(*access::base(std::declval< D const & >()))); template<typename D = Derived> constexpr auto operator->() noexcept(noexcept(detail::make_pointer< pointer, reference >(*std::declval< D & >()))); template<typename D = Derived> constexpr auto operator->() const noexcept(noexcept(detail::make_pointer< pointer, reference >(*std::declval< D const & >()))); template<typename D = Derived> constexpr auto operator[](difference_type) const noexcept(noexcept(D(std::declval< D const & >()), std::declval< D & >()+=i, *std::declval< D & >())); template<typename D = Derived, typename Enable = std::enable_if_t<!v1_dtl::plus_eq<D, difference_type>::value> > constexpr auto operator++() noexcept(noexcept(++access::base(std::declval< D & >()))); template<typename D = Derived> constexpr auto operator++() noexcept(noexcept(std::declval< D & >()+=difference_type(1))); template<typename D = Derived> constexpr auto operator++(int) noexcept(noexcept(D(std::declval< D & >()),++std::declval< D & >())); template<typename D = Derived> constexpr auto operator+=(difference_type) noexcept(noexcept(access::base(std::declval< D & >())+=n)); template<typename D = Derived> constexpr auto operator+(difference_type) const noexcept(noexcept(D(std::declval< D & >()), std::declval< D & >()+=i)); template<typename D = Derived, typename Enable = std::enable_if_t<!v1_dtl::plus_eq<D, difference_type>::value> > constexpr auto operator--() noexcept(noexcept(--access::base(std::declval< D & >()))); template<typename D = Derived> constexpr auto operator--() noexcept(noexcept(D(std::declval< D & >()), std::declval< D & >()+=-difference_type(1))); template<typename D = Derived> constexpr auto operator--(int) noexcept(noexcept(D(std::declval< D & >()), --std::declval< D & >())); template<typename D = Derived> constexpr D & operator-=(difference_type) noexcept; template<typename D = Derived> constexpr auto operator-(D) const noexcept(noexcept(access::base(std::declval< D const & >()) - access::base(other))); };
iterator_interface
public member functionstemplate<typename D = Derived> constexpr auto operator*() noexcept(noexcept(*access::base(std::declval< D & >())));
template<typename D = Derived> constexpr auto operator*() const noexcept(noexcept(*access::base(std::declval< D const & >())));
template<typename D = Derived> constexpr auto operator->() noexcept(noexcept(detail::make_pointer< pointer, reference >(*std::declval< D & >())));
template<typename D = Derived> constexpr auto operator->() const noexcept(noexcept(detail::make_pointer< pointer, reference >(*std::declval< D const & >())));
template<typename D = Derived> constexpr auto operator[](difference_type i) const noexcept(noexcept(D(std::declval< D const & >()), std::declval< D & >()+=i, *std::declval< D & >()));
template<typename D = Derived, typename Enable = std::enable_if_t<!v1_dtl::plus_eq<D, difference_type>::value> > constexpr auto operator++() noexcept(noexcept(++access::base(std::declval< D & >())));
template<typename D = Derived> constexpr auto operator++() noexcept(noexcept(std::declval< D & >()+=difference_type(1)));
template<typename D = Derived> constexpr auto operator++(int) noexcept(noexcept(D(std::declval< D & >()),++std::declval< D & >()));
template<typename D = Derived> constexpr auto operator+=(difference_type n) noexcept(noexcept(access::base(std::declval< D & >())+=n));
template<typename D = Derived> constexpr auto operator+(difference_type i) const noexcept(noexcept(D(std::declval< D & >()), std::declval< D & >()+=i));
template<typename D = Derived, typename Enable = std::enable_if_t<!v1_dtl::plus_eq<D, difference_type>::value> > constexpr auto operator--() noexcept(noexcept(--access::base(std::declval< D & >())));
template<typename D = Derived> constexpr auto operator--() noexcept(noexcept(D(std::declval< D & >()), std::declval< D & >()+=-difference_type(1)));
template<typename D = Derived> constexpr auto operator--(int) noexcept(noexcept(D(std::declval< D & >()), --std::declval< D & >()));
template<typename D = Derived> constexpr D & operator-=(difference_type i) noexcept;
template<typename D = Derived> constexpr auto operator-(D other) const noexcept(noexcept(access::base(std::declval< D const & >()) - access::base(other)));