| | | | | |

Input Iterators

  • Specialized read_only forward iterator:
  • // comparison logic
    bool  operator == (const Iterator& ) const;  // equality operator
    bool  operator != (const Iterator& ) const;  // non-equality operator
    
    // read-only element access (rvalue only)
    const value_type& operator *  () const;      // dereference operator
    
    // motion
    Iterator&   operator ++ ();                  // prefix increment
    Iterator    operator ++ (int);               // postfix increment
    
    // proper type
                Iterator    ()                   // constructor
                ~Iterator   ()                   // destructor
                Iterator    (const Iterator& );  // copy constructor
    //  no assignment operator
    

| | Top of Page | 7. Iterators - 8 of 13