| Home | Libraries | People | FAQ | More

## 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>
        decltype(*access::base(std::declval< D & >())) operator*();
      template<typename D = Derived>
        decltype(*access::base(std::declval< D const & >())) operator*() const;
      template<typename D = Derived> unspecified operator->();
      template<typename D = Derived> unspecified operator->() const;
      template<typename D = Derived>
        decltype(std::declval< D & >()+=i, *std::declval< D & >())
        operator[](difference_type) const;
      template<typename D = Derived,
               typename Enable = std::enable_if_t<!v1_dtl::plus_eq<D, difference_type>::value> >
        decltype(++access::base(std::declval< D & >()), std::declval< D & >())
        operator++();
      template<typename D = Derived>
        decltype(std::declval< D & >()+=difference_type(1), std::declval< D & >())
        operator++();
      template<typename D = Derived>
        std::remove_reference_t< decltype(D(std::declval< D & >()),++std::declval< D & >(), std::declval< D & >())>
        operator++(int);
      template<typename D = Derived>
        decltype(access::base(std::declval< D & >())+=n, std::declval< D & >())
        operator+=(difference_type);
      template<typename D = Derived>
        std::remove_reference_t< decltype(D(std::declval< D & >()), std::declval< D & >()+=i, std::declval< D & >())>
        operator+(difference_type) const;
      template<typename D = Derived,
               typename Enable = std::enable_if_t<!v1_dtl::plus_eq<D, difference_type>::value> >
        decltype(--access::base(std::declval< D & >()), std::declval< D & >())
        operator--();
      template<typename D = Derived>
        decltype(std::declval< D & >()+=-difference_type(1), std::declval< D & >())
        operator--();
      template<typename D = Derived>
        std::remove_reference_t< decltype(D(std::declval< D & >()), --std::declval< D & >(), std::declval< D & >())>
        operator--(int);
      template<typename D = Derived> D & operator-=(difference_type) noexcept;
      template<typename D = Derived>
        decltype(access::base(std::declval< D const & >()) - access::base(other))
        operator-(D) const;
    };

## Description

### `iterator_interface` public member functions

1.     template<typename D = Derived>
         decltype(*access::base(std::declval< D & >())) operator*();

2.     template<typename D = Derived>
         decltype(*access::base(std::declval< D const & >())) operator*() const;

3.     template<typename D = Derived> unspecified operator->();

4.     template<typename D = Derived> unspecified operator->() const;

5.     template<typename D = Derived>
         decltype(std::declval< D & >()+=i, *std::declval< D & >())
         operator[](difference_type i) const;

6.     template<typename D = Derived,
                typename Enable = std::enable_if_t<!v1_dtl::plus_eq<D, difference_type>::value> >
         decltype(++access::base(std::declval< D & >()), std::declval< D & >())
         operator++();

7.     template<typename D = Derived>
         decltype(std::declval< D & >()+=difference_type(1), std::declval< D & >())
         operator++();

8.     template<typename D = Derived>
         std::remove_reference_t< decltype(D(std::declval< D & >()),++std::declval< D & >(), std::declval< D & >())>
         operator++(int);

9.     template<typename D = Derived>
         decltype(access::base(std::declval< D & >())+=n, std::declval< D & >())
         operator+=(difference_type n);

10.     template<typename D = Derived>
          std::remove_reference_t< decltype(D(std::declval< D & >()), std::declval< D & >()+=i, std::declval< D & >())>
          operator+(difference_type i) const;

11.     template<typename D = Derived,
                 typename Enable = std::enable_if_t<!v1_dtl::plus_eq<D, difference_type>::value> >
          decltype(--access::base(std::declval< D & >()), std::declval< D & >())
          operator--();

12.     template<typename D = Derived>
          decltype(std::declval< D & >()+=-difference_type(1), std::declval< D & >())
          operator--();

13.     template<typename D = Derived>
          std::remove_reference_t< decltype(D(std::declval< D & >()), --std::declval< D & >(), std::declval< D & >())>
          operator--(int);

14.     template<typename D = Derived> D & operator-=(difference_type i) noexcept;

15.     template<typename D = Derived>
          decltype(access::base(std::declval< D const & >()) - access::base(other))
          operator-(D other) const;