Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Struct template iterator_interface

boost::stl_interfaces::iterator_interface

Synopsis

// 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)));
};

Description

iterator_interface public member functions

  1. template<typename D = Derived> 
      constexpr auto 
      operator*() noexcept(noexcept(*access::base(std::declval< D & >())));
  2. template<typename D = Derived> 
      constexpr auto 
      operator*() const noexcept(noexcept(*access::base(std::declval< D const & >())));
  3. template<typename D = Derived> 
      constexpr auto 
      operator->() noexcept(noexcept(detail::make_pointer< pointer, reference >(*std::declval< D & >())));
  4. template<typename D = Derived> 
      constexpr auto 
      operator->() const noexcept(noexcept(detail::make_pointer< pointer, reference >(*std::declval< D const & >())));
  5. 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 & >()));
  6. 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 & >())));
  7. template<typename D = Derived> 
      constexpr auto 
      operator++() noexcept(noexcept(std::declval< D & >()+=difference_type(1)));
  8. template<typename D = Derived> 
      constexpr auto 
      operator++(int) noexcept(noexcept(D(std::declval< D & >()),++std::declval< D & >()));
  9. template<typename D = Derived> 
      constexpr auto 
      operator+=(difference_type n) noexcept(noexcept(access::base(std::declval< D & >())+=n));
  10. template<typename D = Derived> 
      constexpr auto 
      operator+(difference_type i) const noexcept(noexcept(D(std::declval< D & >()), std::declval< D & >()+=i));
  11. 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 & >())));
  12. template<typename D = Derived> 
      constexpr auto 
      operator--() noexcept(noexcept(D(std::declval< D & >()), std::declval< D & >()+=-difference_type(1)));
  13. template<typename D = Derived> 
      constexpr auto 
      operator--(int) noexcept(noexcept(D(std::declval< D & >()), --std::declval< D & >()));
  14. template<typename D = Derived> 
      constexpr D & operator-=(difference_type i) noexcept;
  15. template<typename D = Derived> 
      constexpr auto 
      operator-(D other) const noexcept(noexcept(access::base(std::declval< D const & >()) - access::base(other)));

PrevUpHomeNext