Topic: insert_iterator::operator++(int)


Author: Stefan Kuhlins <kuhlins@wifo.uni-mannheim.de>
Date: 1997/12/09
Raw View
Why is the return-type for operator++(int) of back_insert_iterator and
front_insert_iterator a copy and of insert_iterator and
ostream_iterator a reference?
I think all three iterators should use the same type.

 24.4.2.2.4   [lib.back.insert.iter.op++]

  back_insert_iterator<Container>  operator++(int);

 24.4.2.4.4   [lib.front.insert.iter.op++]

  front_insert_iterator<Container>  operator++(int);

 24.4.2.6.4   [lib.insert.iter.op++]

  insert_iterator<Container>& operator++(int);

 24.5.2.2     [lib.ostream.iterator.ops]

  ostream_iterator& operatot++(int);
>>>                        ^
>>> Another typo!
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]