## Class template counting_output_iterator

hamigaki::counting_output_iterator —

## Synopsis

    template<typename Incrementable>
    class counting_output_iterator {
    public:
      // types
      typedef void                     value_type;
      typedef void                     reference;
      typedef void                     pointer;
      typedef void                     difference_type;
      typedef std::output_iterator_tag iterator_category;

      // construct/copy/destruct
      counting_output_iterator();
      counting_output_iterator(const Incrementable&);

      // operators
      implementation defined operator*() const;
      counting_output_iterator<Incrementable>& operator++();

      // queries
      const Incrementable& base() const;

      private: Incrementable current;
    };

    // creation
    counting_output_iterator<Incrementable>
    make_counting_output_iterator(Incrementable);

## Description

### `counting_output_iterator` construct/copy/destruct

1.     counting_output_iterator();

   Effects: | `current = Incrementable()`

2.     counting_output_iterator(const Incrementable& x);

   Effects: | `current = x`

### `counting_output_iterator` operators

1.     implementation defined operator*() const;

2.     counting_output_iterator<Incrementable>& operator++();

   Effects: | `++current`
   Returns: | `*this`

### `counting_output_iterator` queries

1.     const Incrementable& base() const;

   Returns: | `current`

### `counting_output_iterator` creation

1.     counting_output_iterator<Incrementable>
       make_counting_output_iterator(Incrementable x);

   Returns: | `counting_output_iterator<Incrementable>(x)`

| 製作著作 © 2006, 2007 Takeshi Mouri